[Bugfix][CPU] Fix DeepSeek-R1 (FP8 MLA + MoE) correctness on CPU backend (#56773)
Signed-off-by: jiang1.li <jiang1.li@intel.com>
Li, Jiang committed
Sep 14, 2026 at 17:30 UTC
79f0be21ff4044d53f0a6f911422b9f52064639c
2 files changed
+3
vllm/model_executor/kernels/linear/scaled_mm/cpu.py
+2
@@ -261,6 +261,8 @@ class CPUFp8BlockScaledMMKernel(Fp8BlockScaledMMLinearKernel):
261
return True, None
262
263
def process_weights_after_loading(self, layer: torch.nn.Module) -> None:
264
+ if getattr(layer, "_cpu_skip_gemm_dispatch", False):
265
+ return
266
# Skip the base class process (FP8 padding / fnuz normalization)
267
# which is GPU-oriented. Instead, VNNI-prepack weights for AMX.
268
params = self._get_layer_params(layer)
vllm/model_executor/layers/fused_moe/experts/cpu_moe.py
+1
@@ -468,6 +468,7 @@ class CPUExpertsFp8(mk.FusedMoEExpertsModular):
468
RoutingMethodType.Renormalize,
469
RoutingMethodType.RenormalizeNaive,
470
RoutingMethodType.DeepseekV4,
471
+ RoutingMethodType.DeepSeekV3,
472
]
473
474
@staticmethod