[ROCm][CI] Fall back to lossless Kimi K3 MXFP4 emulation on gfx942 (#50516)
Signed-off-by: Andreas Karatzas <Andreas.Karatzas@amd.com>
This commit is contained in:
@@ -15,6 +15,9 @@ from vllm.model_executor.layers.fused_moe import (
|
||||
SharedExperts,
|
||||
)
|
||||
from vllm.model_executor.layers.fused_moe import modular_kernel as mk
|
||||
from vllm.model_executor.layers.fused_moe.config import (
|
||||
mxfp4_w4a16_moe_quant_config,
|
||||
)
|
||||
from vllm.model_executor.layers.fused_moe.oracle.mxfp4 import (
|
||||
TRITON_BACKENDS,
|
||||
Mxfp4MoeBackend,
|
||||
@@ -868,6 +871,18 @@ class Mxfp4MoEMethod(FusedMoEMethodBase):
|
||||
w1_scale = layer.w13_weight_scale
|
||||
w2_scale = layer.w2_weight_scale
|
||||
|
||||
if self.mxfp4_backend == Mxfp4MoeBackend.EMULATION:
|
||||
# Canonical ``mxfp4`` checkpoints are weight-only W4A16. The
|
||||
# generic EMULATION config is W4A4, so preserve BF16 activations
|
||||
# while the fallback dequantizes only the weights.
|
||||
return mxfp4_w4a16_moe_quant_config(
|
||||
w1_scale=w1_scale,
|
||||
w2_scale=w2_scale,
|
||||
w1_bias=w1_bias,
|
||||
w2_bias=w2_bias,
|
||||
gemm1_clamp_limit=swiglu_limit,
|
||||
)
|
||||
|
||||
return make_mxfp4_moe_quant_config(
|
||||
mxfp4_backend=self.mxfp4_backend,
|
||||
w1_scale=w1_scale,
|
||||
|
||||
Reference in New Issue
Block a user