Skip to content

Commit 8e69ed1

Browse files
committed
fix(gguf): Add softcapping config mapping for Gemma2 and Gemma3
Add attn_logit_softcapping and final_logit_softcapping mappings to both gemma2 and gemma3 GGUF config mappings. Without these mappings, softcapping values are not extracted from GGUF metadata, causing the model to use hardcoded defaults instead of the actual values stored in the GGUF file.
1 parent 47b0e47 commit 8e69ed1

File tree

1 file changed

+4
-0
lines changed
  • src/transformers/integrations

1 file changed

+4
-0
lines changed

src/transformers/integrations/ggml.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,8 @@
245245
"attention.head_count_kv": "num_key_value_heads",
246246
"attention.layer_norm_rms_epsilon": "rms_norm_eps",
247247
"attention.sliding_window": "sliding_window",
248+
"attn_logit_softcapping": "attn_logit_softcapping",
249+
"final_logit_softcapping": "final_logit_softcapping",
248250
"vocab_size": "vocab_size",
249251
},
250252
"gemma3": {
@@ -261,6 +263,8 @@
261263
"attention.head_count_kv": "num_key_value_heads",
262264
"attention.layer_norm_rms_epsilon": "rms_norm_eps",
263265
"attention.sliding_window": "sliding_window",
266+
"attn_logit_softcapping": "attn_logit_softcapping",
267+
"final_logit_softcapping": "final_logit_softcapping",
264268
"vocab_size": "vocab_size",
265269
},
266270
"umt5": {

0 commit comments

Comments
 (0)