[Bugfix] Define router_logits_dtype for remaining MoE models (#33737)

Signed-off-by: mgoin <mgoin64@gmail.com>
This commit is contained in:
Michael Goin
2026-02-04 13:24:14 +08:00
committed by GitHub
parent 2647163674
commit eb5ed20743
6 changed files with 9 additions and 4 deletions
+1 -1
View File
@@ -71,7 +71,6 @@ class FlexOlmoMoE(nn.Module):
prefix=f"{prefix}.gate",
)
# Gate always runs at half / full precision for now.
self.experts = FusedMoE(
num_experts=hf_config.num_experts,
top_k=hf_config.num_experts_per_tok,
@@ -82,6 +81,7 @@ class FlexOlmoMoE(nn.Module):
quant_config=None,
tp_size=tp_size,
prefix=f"{prefix}.experts",
router_logits_dtype=torch.float32,
)
self.top_k = hf_config.num_experts_per_tok