[Kernel] Applies routed_scaling_factor internally (#47408)

Signed-off-by: Jee Jee Li <jeejeelee@inferact.ai>
This commit is contained in:
Jee Jee Li
2026-07-07 02:00:54 -07:00
committed by GitHub
parent e55cc59e52
commit 5d23ca47ab
8 changed files with 56 additions and 44 deletions
+1
View File
@@ -77,6 +77,7 @@ class DeepseekV32DecoderLayer(torch.nn.Module):
parallel_config=parallel_config,
quant_config=quant_config,
prefix=f"{prefix}.mlp",
apply_routed_scale_to_output=False,
)
# Defer the MoE cross-rank all-reduce; it is fused into the next
# layer's input_layernorm (or the final norm) via
-1
View File
@@ -258,7 +258,6 @@ class MiniMaxM3MoE(nn.Module):
swiglu_alpha=config.swiglu_alpha,
swiglu_beta=config.swiglu_beta,
routed_scaling_factor=self.routed_scaling_factor,
apply_routed_scale_to_output=True,
router_logits_dtype=self.gate.out_dtype,
shared_experts=self.shared_experts,
quant_config=quant_config,