From 0acc1d3c9ad7e912d2ecfe245bc29c6486ada405 Mon Sep 17 00:00:00 2001 From: shiyu7 <65223714+shiyu7@users.noreply.github.com> Date: Wed, 18 Mar 2026 13:42:06 +0800 Subject: [PATCH] fix: change qwen 3.5 linear attention a_log to fp32 (#19961) Co-authored-by: sunqi.7 --- python/sglang/srt/models/qwen3_5.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/sglang/srt/models/qwen3_5.py b/python/sglang/srt/models/qwen3_5.py index fd7aaf258..0cdb4dd83 100644 --- a/python/sglang/srt/models/qwen3_5.py +++ b/python/sglang/srt/models/qwen3_5.py @@ -193,7 +193,7 @@ class Qwen3_5GatedDeltaNet(nn.Module): torch.ones(self.num_v_heads // self.attn_tp_size), ) self.A_log = nn.Parameter( - torch.empty(self.num_v_heads // self.attn_tp_size), + torch.empty(self.num_v_heads // self.attn_tp_size, dtype=torch.float32), ) set_weight_attrs(self.A_log, {"weight_loader": sharded_weight_loader(0)})