From 3f7dfba419266a92a46e59f9ddbdc0bba2668000 Mon Sep 17 00:00:00 2001 From: amote-i <49533125+amote-i@users.noreply.github.com> Date: Tue, 7 Apr 2026 14:36:57 +0800 Subject: [PATCH] fix qwen2_5_math_rm_72b (#21295) --- python/sglang/srt/models/qwen2.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/sglang/srt/models/qwen2.py b/python/sglang/srt/models/qwen2.py index 84cfa46f1..55659586d 100644 --- a/python/sglang/srt/models/qwen2.py +++ b/python/sglang/srt/models/qwen2.py @@ -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(