From 7afc862637e2522f5098587874ba7a269b563434 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 9 Mar 2026 10:42:38 +0000 Subject: [PATCH 1/2] Correcting the emulate logic Signed-off-by: wangjiaxin99 --- .../layers/quantization/quark/quark_moe.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/vllm/model_executor/layers/quantization/quark/quark_moe.py b/vllm/model_executor/layers/quantization/quark/quark_moe.py index 0a5db4e71fdb..dab98102826b 100644 --- a/vllm/model_executor/layers/quantization/quark/quark_moe.py +++ b/vllm/model_executor/layers/quantization/quark/quark_moe.py @@ -730,10 +730,11 @@ def __init__( get_current_vllm_config().model_config.hf_config, "model_type", None ) - self.emulate = ( - not current_platform.supports_mx() - or not self.ocp_mx_scheme.startswith("w_mxfp4") - ) and (self.mxfp4_backend is None or not self.use_rocm_aiter_moe) + self.emulate = not ( + current_platform.supports_mx() + and self.ocp_mx_scheme.startswith("w_mxfp4") + and self.mxfp4_backend is not None + and self.use_rocm_aiter_moe) # CK's pre-compiled MXFP4 MoE GEMM kernel instances have dimension # alignment requirements. When violated (e.g. MiniMax-M2.1 with From 9f9fe9d926f5bf835ec83fa8e66e2f6838555a8c Mon Sep 17 00:00:00 2001 From: root Date: Mon, 9 Mar 2026 11:36:16 +0000 Subject: [PATCH 2/2] Fix pre-commit issues Signed-off-by: <> Signed-off-by: wangjiaxin99 --- vllm/model_executor/layers/quantization/quark/quark_moe.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vllm/model_executor/layers/quantization/quark/quark_moe.py b/vllm/model_executor/layers/quantization/quark/quark_moe.py index dab98102826b..a3e0f24fb662 100644 --- a/vllm/model_executor/layers/quantization/quark/quark_moe.py +++ b/vllm/model_executor/layers/quantization/quark/quark_moe.py @@ -734,7 +734,8 @@ def __init__( current_platform.supports_mx() and self.ocp_mx_scheme.startswith("w_mxfp4") and self.mxfp4_backend is not None - and self.use_rocm_aiter_moe) + and self.use_rocm_aiter_moe + ) # CK's pre-compiled MXFP4 MoE GEMM kernel instances have dimension # alignment requirements. When violated (e.g. MiniMax-M2.1 with