fix qwen2_5_math_rm_72b (#21295)

This commit is contained in:
amote-i
2026-04-07 14:36:57 +08:00
committed by GitHub
parent f6e85676b5
commit 3f7dfba419
+3 -1
View File
@@ -577,7 +577,9 @@ class Qwen2ForCausalLM(nn.Module):
continue
if name == "model.embed_tokens.weight":
if self.pp_group.is_last_rank and self.config.tie_word_embeddings:
if (
not hasattr(self, "pp_group") or self.pp_group.is_last_rank
) and self.config.tie_word_embeddings:
if "lm_head.weight" in params_dict:
param = params_dict["lm_head.weight"]
weight_loader = getattr(