File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -3368,7 +3368,7 @@ def set_gguf_parameters(self):
33683368 self .gguf_writer .add_file_type (self .ftype )
33693369 self .gguf_writer .add_rope_freq_base (hparams .get ("rope_theta" , 1_000_000.0 )) # for global layers
33703370 # both attn_logit_softcapping and final_logit_softcapping are removed in Gemma3
3371- assert hparams .get ("attn_logit_softcapping" ) is None
3371+ assert hparams .get ("attn_logit_softcapping" ) is None
33723372 assert hparams .get ("final_logit_softcapping" ) is None
33733373 self .gguf_writer .add_sliding_window (hparams ["sliding_window" ])
33743374 self .gguf_writer .add_head_count_kv (hparams .get ("num_key_value_heads" , 4 ))
Original file line number Diff line number Diff line change 99#include < algorithm>
1010#include < cassert>
1111#include < cstring>
12+ #include < cmath>
1213#include < functional>
1314#include < map>
1415#include < sstream>
@@ -878,8 +879,8 @@ void llama_model::load_hparams(llama_model_loader & ml) {
878879 }
879880
880881 hparams.f_attention_scale = type == LLM_TYPE_27B
881- ? 1 .0f / sqrtf (float (hparams.n_embd / hparams.n_head (0 )))
882- : 1 .0f / sqrtf (float (hparams.n_embd_head_k ));
882+ ? 1 .0f / std:: sqrtf (float (hparams.n_embd / hparams.n_head (0 )))
883+ : 1 .0f / std:: sqrtf (float (hparams.n_embd_head_k ));
883884 } break ;
884885 case LLM_ARCH_STARCODER2:
885886 {
You can’t perform that action at this time.
0 commit comments