Skip to content

[XPU] [Bugfix] process ragged weights in xpu linear backend - #52118

Merged
jikunshang merged 3 commits into
vllm-project:mainfrom
zufangzhu:zufang/process_ragged_weights
Aug 14, 2026
Merged

[XPU] [Bugfix] process ragged weights in xpu linear backend#52118
jikunshang merged 3 commits into
vllm-project:mainfrom
zufangzhu:zufang/process_ragged_weights

Conversation

@zufangzhu

@zufangzhu zufangzhu commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

python examples/basic/offline_inference/generate.py --model gaunernst/DeepSeek-V2-Lite-Chat-FP8 --enforce-eager --max-model-len 2048 --trust-remote-code

Before:
image

After:
image

Signed-off-by: Zhu, Zufang <zufang.zhu@intel.com>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@mergify mergify Bot added intel-gpu Related to Intel GPU bug Something isn't working labels Aug 13, 2026
Signed-off-by: Zhu, Zufang <zufang.zhu@intel.com>
Signed-off-by: Zhu, Zufang <zufang.zhu@intel.com>
@jikunshang

Copy link
Copy Markdown
Member

/ci run

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #83715 for commit e63a140a7858.

@jikunshang
jikunshang merged commit fe4c5dc into vllm-project:main Aug 14, 2026
84 checks passed
libinta added a commit to libinta/vllm that referenced this pull request Aug 14, 2026
The shared MLA layer (mla_attention.py::forward_impl) reads
num_decodes/num_prefills/num_decode_tokens on every MLA metadata (it asserts
they are not None and uses num_decode_tokens to split MQA vs dense-MHA
tokens). The CUDA sparse backends supply these via
SparseMLACommonMetadataBuilder, but the XPU sparse backend builds its own
metadata and omitted them, so a sparse-MLA (DeepSeek DSA / GLM) run on XPU
crashed with:

    'XPUMLASparseMetadata' object has no attribute 'num_decode_tokens'

Add the fields and populate them so all tokens route through the top-k sparse
MQA path (num_decode_tokens == num_actual_tokens, num_prefills == 0), which
this backend already implements for both prefill and decode. This keeps the
shared layer's num_mha_tokens at 0 and never enters the dense-MHA prefill
branch (whose prefill-only fields this backend does not provide).

XPU-only; does not touch CUDA/ROCm/CPU backends. The ragged-N FP8 block-scale
GEMM fix that previously accompanied this change is now covered upstream by
vllm-project#52118, so it is dropped here.

Signed-off-by: Libin Tang <libin.tang@intel.com>
Alessandra005 pushed a commit to Alessandra005/vllm that referenced this pull request Aug 17, 2026
…ject#52118)

Signed-off-by: Zhu, Zufang <zufang.zhu@intel.com>
Signed-off-by: Alessandra005 <aurib032@fiu.edu>
zyp2014 pushed a commit to zyp2014/vllm that referenced this pull request Aug 21, 2026
wyettzeng pushed a commit to wyettzeng/vllm that referenced this pull request Aug 21, 2026
…ject#52118)

Signed-off-by: Zhu, Zufang <zufang.zhu@intel.com>
Signed-off-by: Wyett <wyettzeng@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working intel-gpu Related to Intel GPU

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants