From 1225fab2ecb342c264f39c03142beb9c4b3e06c0 Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Sat, 20 May 2023 11:26:50 +0800 Subject: [PATCH] fix f16 format detection in neox --- model_adapter.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/model_adapter.cpp b/model_adapter.cpp index 2c65b3a4b..75b115bfc 100644 --- a/model_adapter.cpp +++ b/model_adapter.cpp @@ -164,8 +164,13 @@ void print_tok_vec(std::vector &embd) bool isNewFtype = (temp2>=1000 && temp2<=9000 && temp2%1000<20); if(!isNewFtype) - { + { fileformat = FileFormat::NEOX_2; + if((temp==0||temp==1)&&(temp2==0||temp2==1))//special case: par_res and ftype are both 1 or 0 + { + //its a f16/f32 model in the new format + fileformat = FileFormat::NEOX_4; + } } else {