Skip to content

Commit 9070e33

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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

convert-llama-7b-pth-to-gguf.py

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

121-
if "rope_scaling" in hparams and "factor" in hparams["rope_scaling"]:
121+
if "rope_scaling" in hparams and hparams["rope_scaling"] != None and "factor" in hparams["rope_scaling"]:
122122
if "type" in hparams["rope_scaling"]:
123123
if hparams["rope_scaling"]["type"] == "linear":
124124
gguf_writer.add_rope_scale_linear(hparams["rope_scaling"]["factor"])

0 commit comments

Comments
 (0)