diff --git a/vllm/model_executor/layers/fused_moe/experts/trtllm_bf16_moe.py b/vllm/model_executor/layers/fused_moe/experts/trtllm_bf16_moe.py index 592a1513d7..033b7dc7d9 100644 --- a/vllm/model_executor/layers/fused_moe/experts/trtllm_bf16_moe.py +++ b/vllm/model_executor/layers/fused_moe/experts/trtllm_bf16_moe.py @@ -80,6 +80,8 @@ class TrtLlmBf16Experts(mk.FusedMoEExpertsMonolithic): RoutingMethodType.Llama4, RoutingMethodType.Renormalize, RoutingMethodType.RenormalizeNaive, + RoutingMethodType.SigmoidRenorm, + RoutingMethodType.Sigmoid, ] @staticmethod diff --git a/vllm/model_executor/layers/fused_moe/experts/trtllm_nvfp4_moe.py b/vllm/model_executor/layers/fused_moe/experts/trtllm_nvfp4_moe.py index cbfabce502..e90c4d6646 100644 --- a/vllm/model_executor/layers/fused_moe/experts/trtllm_nvfp4_moe.py +++ b/vllm/model_executor/layers/fused_moe/experts/trtllm_nvfp4_moe.py @@ -350,9 +350,9 @@ class TrtLlmNvFp4ExpertsMonolithic( RoutingMethodType.RenormalizeNaive, RoutingMethodType.Llama4, RoutingMethodType.SigmoidRenorm, + RoutingMethodType.Sigmoid, RoutingMethodType.MiniMax2, RoutingMethodType.Simulated, - RoutingMethodType.SigmoidRenorm, ] @staticmethod diff --git a/vllm/model_executor/layers/fused_moe/router/custom_routing_router.py b/vllm/model_executor/layers/fused_moe/router/custom_routing_router.py index 731afffd15..8ea4e4925b 100644 --- a/vllm/model_executor/layers/fused_moe/router/custom_routing_router.py +++ b/vllm/model_executor/layers/fused_moe/router/custom_routing_router.py @@ -38,9 +38,11 @@ class CustomRoutingRouter(BaseRouter): # NOTE: FLASHINFER_TRTLLM support the Llama4 router. if self.custom_routing_function == Llama4MoE.custom_routing_function: return RoutingMethodType.Llama4 - # Cohere MoE uses a sigmoid -> top-k -> renormalize routing function. + # Cohere MoE uses sigmoid -> top-k, optionally followed by renormalize. if self.custom_routing_function == token_choice_with_bias: - return RoutingMethodType.SigmoidRenorm + if self.renormalize: + return RoutingMethodType.SigmoidRenorm + return RoutingMethodType.Sigmoid return RoutingMethodType.Custom def _compute_routing(