Skip to content
Closed
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,11 @@ def get_moe_method(
layer_config: "INCLayerConfig",
):
del config, prefix
# XPU and CPU do not support MoE quantization yet
if current_platform.is_xpu() or current_platform.is_cpu():
# CPU does not support quantized MoE yet; fall back to dequantized bf16.
# XPU is supported via the WNA16 oracle backend (routes through
# _resolve_gptq_moe -> MoeWNA16Method -> XPUExpertsWNA16), so it must
# NOT take this dequant fallback, which OOMs materializing bf16 experts.
if current_platform.is_cpu():

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sgurwinderr, this part looks good to me. Thanks for the fix!

There is a similar fix in #47124.

from vllm.model_executor.layers.fused_moe import (
UnquantizedFusedMoEMethod,
)
Expand Down Expand Up @@ -128,7 +131,12 @@ def _resolve_gptq_moe(layer: "torch.nn.Module", layer_config: "INCLayerConfig"):
(4, True): scalar_types.uint4b8,
(8, True): scalar_types.uint8b128,
}
use_marlin = (layer_config.bits, layer_config.sym) in gptq_type_map
# Marlin is a CUDA-only path; XPU uses the WNA16 oracle backend instead
# (check_moe_marlin_supports_layer is platform-agnostic, so gate it here).
use_marlin = (
layer_config.bits,
layer_config.sym,
) in gptq_type_map and not current_platform.is_xpu()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this part, do we really need this gate? AutoGPTQMoEMethod should support XPU as well, right?
Can we leave it as is and leverage AutoGPTQMoEMethod to construct the WNA16 method for XPU?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vllm-xpu-kernels uses XPUExpertsWNA16, so here is expected.

if use_marlin:
use_marlin = check_marlin_supported(
gptq_type_map[(layer_config.bits, layer_config.sym)],
Expand Down
Loading