@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 468a8d72ba
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 13, 00:45 UTC

[Bugfix] Fix FusedMoEModularKernel for triton backend (#28913)

Signed-off-by: Xin Yang <xyangx@amazon.com>

Xin Yang committed Nov 18, 2025 at 21:05 UTC 468a8d72bac181c1499320478940cec64363e107
1 file changed +6 -4
vllm/model_executor/layers/quantization/mxfp4.py
+6 -4
@@ -755,8 +755,10 @@ class Mxfp4MoEMethod(FusedMoEMethodBase):
755
756 self.w13_weight = w13_weight
757 self.w2_weight = w2_weight
758 - layer.w13_weight = Parameter(w13_weight.storage.data, requires_grad=False)
759 - layer.w2_weight = Parameter(w2_weight.storage.data, requires_grad=False)
758 + del layer.w13_weight
759 + del layer.w2_weight
760 + layer.w13_weight = w13_weight
761 + layer.w2_weight = w2_weight
762 else:
763 raise ValueError(f"Unsupported backend: {self.mxfp4_backend}")
764
@@ -1065,8 +1067,8 @@ class Mxfp4MoEMethod(FusedMoEMethodBase):
1067
1068 return triton_kernel_moe_forward(
1069 hidden_states=x,
1068 - w1=self.w13_weight,
1069 - w2=self.w2_weight,
1070 + w1=layer.w13_weight,
1071 + w2=layer.w2_weight,
1072 gating_output=router_logits,
1073 topk=top_k,
1074 renormalize=renormalize,