From 0645adc8b38be5556901e3fcf0e227a2f65cd592 Mon Sep 17 00:00:00 2001 From: Yoshi Suhara Date: Tue, 13 Aug 2024 21:25:43 -0700 Subject: [PATCH] Cover corner case for role_scaling not in config.json --- convert_hf_to_gguf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/convert_hf_to_gguf.py b/convert_hf_to_gguf.py index 44a9afb07..9d0501e8e 100755 --- a/convert_hf_to_gguf.py +++ b/convert_hf_to_gguf.py @@ -3759,7 +3759,7 @@ class NemotronModel(Model): self.gguf_writer.add_rope_dimension_count(int(rot_pct * n_embd) // n_head) # * RopeScaling for Nemotron - if self.hparams["rope_scaling"] is None: + if "rope_scaling" not in self.hparams or self.hparams["rope_scaling"] is None: self.gguf_writer.add_rope_scaling_type(gguf.RopeScalingType.NONE) else: self.gguf_writer.add_rope_scaling_type(gguf.RopeScalingType.LINEAR)