Skip to content

Commit b0f1796

Browse files
gabe-l-hartCISC
andauthored
fix: Correctly search num_experts_per_tok as optional
Co-authored-by: Sigbjørn Skjæret <[email protected]>
1 parent bb98b31 commit b0f1796

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

convert_hf_to_gguf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7662,7 +7662,7 @@ def __init__(self, *args, **kwargs):
76627662
# "granite" or "granitemoe" model
76637663
if not self._ssm_layers:
76647664
old_arch = self.gguf_writer.arch
7665-
has_experts = self.find_hparam(["num_experts_per_tok"])
7665+
has_experts = self.find_hparam(["num_experts_per_tok"], optional=True)
76667666
new_arch = (
76677667
gguf.MODEL_ARCH_NAMES[gguf.MODEL_ARCH.GRANITE_MOE]
76687668
if has_experts else

0 commit comments

Comments
 (0)