@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / a50e675b0d
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 1, 20:00 UTC

[Cohere] fix RoutingMethodType (#44021)

Signed-off-by: Terrencezzj <terrence@cohere.ai>

Terrence Zhao committed Jun 5, 2026 at 19:25 UTC a50e675b0d864660b10bfdc40f3b0224695d0a92
3 files changed +7 -3
vllm/model_executor/layers/fused_moe/experts/trtllm_bf16_moe.py
+2
@@ -80,6 +80,8 @@ class TrtLlmBf16Experts(mk.FusedMoEExpertsMonolithic):
80 RoutingMethodType.Llama4,
81 RoutingMethodType.Renormalize,
82 RoutingMethodType.RenormalizeNaive,
83 + RoutingMethodType.SigmoidRenorm,
84 + RoutingMethodType.Sigmoid,
85 ]
86
87 @staticmethod
vllm/model_executor/layers/fused_moe/experts/trtllm_nvfp4_moe.py
+1 -1
@@ -350,9 +350,9 @@ class TrtLlmNvFp4ExpertsMonolithic(
350 RoutingMethodType.RenormalizeNaive,
351 RoutingMethodType.Llama4,
352 RoutingMethodType.SigmoidRenorm,
353 + RoutingMethodType.Sigmoid,
354 RoutingMethodType.MiniMax2,
355 RoutingMethodType.Simulated,
355 - RoutingMethodType.SigmoidRenorm,
356 ]
357
358 @staticmethod
vllm/model_executor/layers/fused_moe/router/custom_routing_router.py
+4 -2
@@ -38,9 +38,11 @@ class CustomRoutingRouter(BaseRouter):
38 # NOTE: FLASHINFER_TRTLLM support the Llama4 router.
39 if self.custom_routing_function == Llama4MoE.custom_routing_function:
40 return RoutingMethodType.Llama4
41 - # Cohere MoE uses a sigmoid -> top-k -> renormalize routing function.
41 + # Cohere MoE uses sigmoid -> top-k, optionally followed by renormalize.
42 if self.custom_routing_function == token_choice_with_bias:
43 - return RoutingMethodType.SigmoidRenorm
43 + if self.renormalize:
44 + return RoutingMethodType.SigmoidRenorm
45 + return RoutingMethodType.Sigmoid
46 return RoutingMethodType.Custom
47
48 def _compute_routing(