[ROCm][MoE] Support MiMo-V2.6 MXFP4 on gfx942 (#58262)
Signed-off-by: vllmellm <vllm.ellm@embeddedllm.com>
This commit is contained in:
@@ -295,6 +295,7 @@ class AiterW4A16ExpertsMonolithic(mk.FusedMoEExpertsMonolithic):
|
||||
RoutingMethodType.Renormalize,
|
||||
RoutingMethodType.RenormalizeNaive,
|
||||
RoutingMethodType.DeepseekV4,
|
||||
RoutingMethodType.DeepSeekV3,
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
@@ -344,6 +345,7 @@ class AiterW4A16ExpertsMonolithic(mk.FusedMoEExpertsMonolithic):
|
||||
RoutingMethodType.Renormalize,
|
||||
RoutingMethodType.RenormalizeNaive,
|
||||
RoutingMethodType.DeepseekV4,
|
||||
RoutingMethodType.DeepSeekV3,
|
||||
]
|
||||
|
||||
@staticmethod
|
||||
@@ -373,11 +375,20 @@ class AiterW4A16ExpertsMonolithic(mk.FusedMoEExpertsMonolithic):
|
||||
routed_scaling_factor: float | None = None,
|
||||
topk_group: int | None = None,
|
||||
) -> torch.Tensor:
|
||||
score_mode = (
|
||||
"sqrtsoftplus"
|
||||
if self.moe_config.routing_method == RoutingMethodType.DeepseekV4
|
||||
else None
|
||||
)
|
||||
routing_method = self.moe_config.routing_method
|
||||
if routing_method == RoutingMethodType.DeepseekV4:
|
||||
score_mode = "sqrtsoftplus"
|
||||
elif routing_method == RoutingMethodType.DeepSeekV3:
|
||||
# MiMo-V2.6: an ungrouped sigmoid router with a per-expert
|
||||
# correction bias. aiter's flat top-k implements this natively
|
||||
# (select on sigmoid(logits) + bias, return the unbiased sigmoid
|
||||
# scores).
|
||||
assert e_score_correction_bias is not None, (
|
||||
"DeepSeekV3 routing requires e_score_correction_bias"
|
||||
)
|
||||
score_mode = "sigmoid"
|
||||
else:
|
||||
score_mode = None
|
||||
return aiter_triton_kernel_w4a16_moe_forward(
|
||||
hidden_states=hidden_states,
|
||||
w1=w1,
|
||||
|
||||
Reference in New Issue
Block a user