Skip to content

Commit 7a7d1ba

Browse files
authored
convert-llama-hf-to-gguf.py : rope scale fix
1 parent 9070e33 commit 7a7d1ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

convert-llama-hf-to-gguf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def count_model_parts(dir_model: str) -> int:
126126
gguf_writer.add_head_count_kv(head_count_kv)
127127
gguf_writer.add_layer_norm_rms_eps(hparams["rms_norm_eps"])
128128

129-
if "rope_scaling" in hparams and "factor" in hparams["rope_scaling"]:
129+
if "rope_scaling" in hparams and hparams["rope_scaling"] != None and "factor" in hparams["rope_scaling"]:
130130
if "type" in hparams["rope_scaling"]:
131131
if hparams["rope_scaling"]["type"] == "linear":
132132
gguf_writer.add_rope_scale_linear(hparams["rope_scaling"]["factor"])

0 commit comments

Comments
 (0)