@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / aaa3092f51
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 6, 19:15 UTC

[MoE] Add routing simulation override for MXFP4 quantized MoE (#33595)

Signed-off-by: Jaewon Lee <jaewon@meta.com>

Jaewon committed Mar 12, 2026 at 17:30 UTC aaa3092f5137870d7a30e17bdbcd3f8268fa4c29
1 file changed +6
vllm/model_executor/layers/quantization/mxfp4.py
+6
@@ -1109,6 +1109,12 @@ class Mxfp4MoEMethod(FusedMoEMethodBase):
1109 layer.eplb_state.logical_replica_count,
1110 ), "MXFP4 are not supported with this configuration."
1111
1112 + # Apply routing simulation strategy if specified.
1113 + # This applies to all monolithic backends (SM100_FI and TRITON).
1114 + routing_strategy = envs.VLLM_MOE_ROUTING_SIMULATION_STRATEGY
1115 + if routing_strategy == "uniform_random":
1116 + router_logits = torch.rand_like(router_logits)
1117 +
1118 if (
1119 self.mxfp4_backend == Mxfp4Backend.SM100_FI_MXFP4_MXFP8_TRTLLM
1120 or self.mxfp4_backend == Mxfp4Backend.SM100_FI_MXFP4_BF16