[XPU] [Bugfix] process ragged weights in xpu linear backend - #52118
Merged
jikunshang merged 3 commits intoAug 14, 2026
Conversation
Signed-off-by: Zhu, Zufang <zufang.zhu@intel.com>
Signed-off-by: Zhu, Zufang <zufang.zhu@intel.com>
Signed-off-by: Zhu, Zufang <zufang.zhu@intel.com>
jikunshang
approved these changes
Aug 13, 2026
Member
|
/ci run |
|
✅ Triggered Buildkite CI #83715 for commit |
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
…ject#52118) Signed-off-by: Zhu, Zufang <zufang.zhu@intel.com>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
python examples/basic/offline_inference/generate.py --model gaunernst/DeepSeek-V2-Lite-Chat-FP8 --enforce-eager --max-model-len 2048 --trust-remote-code
Before:

After:
