fix: ensure no double load of lm head in nemotron mtp (#47440)

Signed-off-by: Shaun Kotek - Nvidia <skotek@nvidia.com>
This commit is contained in:
Shaun Kotek
2026-07-07 12:01:45 +00:00
committed by GitHub
parent 0a2965b1b3
commit 7ff656cc8b
+1 -5
View File
@@ -415,11 +415,7 @@ class NemotronHMTP(nn.Module, SupportsPP):
for name, loaded_weight in weights: for name, loaded_weight in weights:
# Only process MTP weights - skip all non-MTP weights # Only process MTP weights - skip all non-MTP weights
if ( if not name.startswith("mtp.") and "embeddings" not in name:
not name.startswith("mtp.")
and "embeddings" not in name
and "lm_head" not in name
):
continue continue
# Skip rotary embeddings (computed, not loaded) # Skip rotary embeddings (computed, not loaded)
if "rotary_emb.inv_freq" in name: if "rotary_emb.inv_freq" in name: