[Fix] Load HunyuanV3 NextN final_layernorm into the draft head's output norm (#30331)
Co-authored-by: Auroter <auroter@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Auroter
Claude Fable 5
parent
a74bee2261
commit
9fec359a60
@@ -186,6 +186,10 @@ class HYV3ForCausalLMNextN(nn.Module):
|
||||
subname = name[len(nextn_prefix) :]
|
||||
if any(subname.startswith(s) for s in spec_weight_names):
|
||||
name = f"model.{subname}"
|
||||
elif subname.startswith("final_layernorm"):
|
||||
# Released checkpoints store the draft head's output norm
|
||||
# as model.layers.<N>.final_layernorm.weight.
|
||||
name = "model.shared_head.norm.weight"
|
||||
else:
|
||||
name = f"model.decoder.{subname}"
|
||||
elif name == "model.shared_head.norm.weight":
|
||||
|
||||
Reference in New Issue
Block a user