[Bugfix] Allocate HY V3 expert_bias in float32 to prevent silent downcasting (#47797)
Signed-off-by: 辰言 <oncwnuIWp30GguOyJ615Fqj8H-yc@git.weixin.qq.com> Signed-off-by: Jee Jee Li <jeejeelee@inferact.ai> Co-authored-by: 辰言 <oncwnuIWp30GguOyJ615Fqj8H-yc@git.weixin.qq.com> Co-authored-by: Jee Jee Li <jeejeelee@inferact.ai> Co-authored-by: Jee Jee Li <pandaleefree@gmail.com>
aoright committed
Jul 8, 2026 at 19:25 UTC
a1ab51afb61e8120d0f36a730eac45969ea81503
1 file changed
+3
-1
vllm/model_executor/models/hy_v3.py
+3
-1
@@ -177,7 +177,9 @@ class HYV3MoEFused(nn.Module):
177
else:
178
self.shared_mlp = None
179
180
- self.expert_bias = nn.Parameter(torch.empty(config.num_experts))
180
+ self.expert_bias = nn.Parameter(
181
+ torch.empty(config.num_experts, dtype=torch.float32)
182
+ )
183
scoring_func = "sigmoid"
184
e_score_correction_bias = self.expert_bias
185