Skip to content

Commit aa4c333

Browse files
CISCMinh141120
authored andcommitted
convert : fix null head_dim AutoConfig regression (ggml-org#14248)
1 parent 60240a7 commit aa4c333

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

convert_hf_to_gguf.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -562,11 +562,8 @@ def set_gguf_parameters(self):
562562
logger.info(f"gguf: experts used count = {n_experts_used}")
563563

564564
if (head_dim := self.hparams.get("head_dim")) is not None:
565-
# Workaround for incorrect AutoConfig value for DeepSeekV3 (is set correctly in DeepSeekV2Model class)
566-
# https://github.com/huggingface/transformers/blob/19224c3642705c5b6988c9f5f4251f83323d05ae/src/transformers/models/deepseek_v3/configuration_deepseek_v3.py#L210
567-
if self.hparams.get("model_type") != "deepseek_v3":
568-
self.gguf_writer.add_key_length(head_dim)
569-
self.gguf_writer.add_value_length(head_dim)
565+
self.gguf_writer.add_key_length(head_dim)
566+
self.gguf_writer.add_value_length(head_dim)
570567

571568
self.gguf_writer.add_file_type(self.ftype)
572569
logger.info(f"gguf: file type = {self.ftype}")

0 commit comments

Comments
 (0)