[Kernel] Applies routed_scaling_factor internally (#47408)
Signed-off-by: Jee Jee Li <jeejeelee@inferact.ai>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user