]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
convert : keep quantization scales for nemotron --mtp export (#26903)
authorynankani <redacted>
Tue, 11 Aug 2026 13:19:05 +0000 (13:19 +0000)
committerGitHub <redacted>
Tue, 11 Aug 2026 13:19:05 +0000 (15:19 +0200)
Signed-off-by: ynankani <redacted>
conversion/nemotron.py

index e5075020c1e3358ad789c52b856e290e2af61162..c46cec143866a83373068859074fbe462c9e8762 100644 (file)
@@ -275,10 +275,18 @@ class NemotronHModel(GraniteHybridModel):
                 return None
         elif cls.mtp_only:
             # --mtp: export the MTP head plus the tensors it shares with the target model
+            # Include lm_head scale sidecars so NVFP4 packing sees them.
             keep = name in (
                 "backbone.embeddings.weight",
                 "backbone.norm_f.weight",
                 "lm_head.weight",
+                "lm_head.weight_scale",
+                "lm_head.weight_scale_2",
+                "lm_head.weight_scale_inv",
+                "lm_head.input_scale",
+                "lm_head.input_global_scale",
+                "lm_head.weight_global_scale",
+                "lm_head.weight_packed",
             )
             if not keep:
                 return None