bugfix(dcp, gdn): disabling DCP semantics for linear-attention KV/state groups - #36480
bugfix(dcp, gdn): disabling DCP semantics for linear-attention KV/state groups#36480pisceskkk wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request disables Decode Context Parallelism (DCP) for non-full-attention layers to address issues with models like Qwen3.5. This is achieved by making context parallelism settings per-KV-cache-group and only enabling them for FullAttentionSpec groups. The changes are implemented across the KV cache coordinator, GPU model runner, and block table management, including updates to a Triton kernel. The implementation is sound, but I've suggested a refactoring to improve maintainability by abstracting the DCP support check into the KVCacheSpec classes. This will make it easier to enable DCP for other attention types in the future.
…ecks and handle group DCP world sizes dynamically Signed-off-by: QiuChunshuo <qiuchunshuo@huawei.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 18bfedf4af
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
LucasWilkinson
left a comment
There was a problem hiding this comment.
It looks like you updated model runner v2; did you test with VLLM_USE_V2_MODEL_RUNNER?
My apologies—this was a bit of a blunder. DCP + Qwen 3.5 actually works fine on Model Runner v1. The earlier errors were caused by a bug in the backend. |
|
Just noting that DCP + Qwen3.5 doesn't necessarily work: Details |
Purpose
This PR fixes Qwen3.5 behavior under Decode Context Parallel (DCP) by applying DCP only to full-attention KV cache groups and keeping linear-attention/Mamba state-cache groups on non-DCP semantics.
Test Plan
Test Result
works well with FULL_DECODE_ONLY if cherry-pick #36503
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.