fix: change qwen 3.5 linear attention a_log to fp32 (#19961)
Co-authored-by: sunqi.7 <sunqi.7@bytedance.com>
This commit is contained in:
@@ -193,7 +193,7 @@ class Qwen3_5GatedDeltaNet(nn.Module):
|
|||||||
torch.ones(self.num_v_heads // self.attn_tp_size),
|
torch.ones(self.num_v_heads // self.attn_tp_size),
|
||||||
)
|
)
|
||||||
self.A_log = nn.Parameter(
|
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)})
|
set_weight_attrs(self.A_log, {"weight_loader": sharded_weight_loader(0)})
|
||||||
|
|||||||
Reference in New Issue
Block a user