@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 3628bcaaf2
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 11, 23:45 UTC

[ROCm][MXFP4] Infer w4a4 quant method in rocm aiter fused moe (#29775)

Signed-off-by: ZhiweiYan-96 <zhiwei.yan@amd.com>

Zhiwei committed Dec 5, 2025 at 19:01 UTC 3628bcaaf229f3ce86b64e73ab88dd64211ddf38
2 files changed +6 -2
vllm/model_executor/layers/fused_moe/config.py
+4
@@ -345,6 +345,10 @@ class FusedMoEQuantConfig:
345 def use_mxfp4_w4a16(self) -> bool:
346 return self._a1.dtype is None and self._w1.dtype == "mxfp4"
347
348 + @property
349 + def use_mxfp4_w4a4(self) -> bool:
350 + return self._a1.dtype == "mxfp4" and self._w1.dtype == "mxfp4"
351 +
352 @property
353 def use_nvfp4_w4a4(self) -> bool:
354 return self.quant_dtype == "nvfp4"
vllm/model_executor/layers/fused_moe/rocm_aiter_fused_moe.py
+2 -2
@@ -221,8 +221,8 @@ def rocm_aiter_fused_experts(
221
222 else:
223 quant_method = QuantMethod.NO.value
224 - # quark moe for mxfp4 w_dtype
225 - if quant_config.use_mxfp4_w4a16:
224 + # quark moe for mxfp4 w_dtype mxfp4 a_dtype
225 + if quant_config.use_mxfp4_w4a4:
226 quant_method = QuantMethod.BLOCK_1X32.value
227 # w8a8 block-scaled
228 if quant_config.block_shape is not None and quant_config.use_fp8_w8a8: