[Model] fix DeepSeek e_score_correction_bias dtype to fp32 (#23640)

Signed-off-by: Jee Jee Li <pandaleefree@gmail.com>
This commit is contained in:
Jee Jee Li 2025-08-26 20:09:47 +08:00 committed by GitHub
parent d52358c1e0
commit fdeb3dac13
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -126,7 +126,7 @@ class DeepseekV2MoE(nn.Module):
prefix=f"{prefix}.gate")
if config.topk_method == "noaux_tc":
self.gate.e_score_correction_bias = nn.Parameter(
torch.empty(config.n_routed_experts))
torch.empty(config.n_routed_experts, dtype=torch.float32))
else:
self.gate.e_score_correction_bias = None