Skip to content

Commit 977d57b

Browse files
committed
Move super to start, don't set block_count
1 parent 8bcd8fe commit 977d57b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

convert_hf_to_gguf.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7139,18 +7139,16 @@ def __init__(self, *args, **kwargs):
71397139
self.hparams["num_experts"] = self.hparams["num_local_experts"]
71407140

71417141
def set_gguf_parameters(self):
7142+
super().set_gguf_parameters()
71427143
if self.hparams["scoring_func"] == "sigmoid":
71437144
self.gguf_writer.add_expert_gating_func(gguf.ExpertGatingFuncType.SIGMOID)
71447145
elif self.hparams["scoring_func"] == "softmax":
71457146
self.gguf_writer.add_expert_gating_func(gguf.ExpertGatingFuncType.SOFTMAX)
71467147
else:
71477148
raise ValueError(f"Unsupported scoring_func value: {self.hparams['scoring_func']}")
71487149

7149-
block_count = self.find_hparam(["num_hidden_layers", "n_layer"])
71507150
self.gguf_writer.add_expert_feed_forward_length(self.find_hparam(["intermediate_size"]))
7151-
self.gguf_writer.add_block_count(block_count)
71527151
self.gguf_writer.add_rope_dimension_count(self.find_hparam(["rotary_dim"]))
7153-
super().set_gguf_parameters()
71547152

71557153
def modify_tensors(self, data_torch: Tensor, name: str, bid: int | None):
71567154
if name.endswith("e_score_correction_bias"):

0 commit comments

Comments
 (0)