Repository navigation
[Feature][DSv4.1] Enable PCP with PP or DP - #63098
Conversation
|
Documentation preview: https://vllm--63098.org.readthedocs.build/en/63098/ |
6b005fd to
6fde1ba
Compare
6fde1ba to
1020d59
Compare
|
This pull request has merge conflicts that must be resolved before it can be |
324b006 to
33d1fb7
Compare
|
Documentation preview: https://vllm--63098.org.readthedocs.build/en/63098/ |
33d1fb7 to
e567383
Compare
Co-authored-by: Codex <noreply@openai.com> Signed-off-by: wangyicong <wangyicong@bytedance.com>
e567383 to
2fbadce
Compare
| and self.parallel_config.data_parallel_size > 1 | ||
| and self.parallel_config.tensor_parallel_size > 1 | ||
| and self.parallel_config.enable_expert_parallel | ||
| ) |
There was a problem hiding this comment.
this whole if seems really complicated? can we simplify it / make it more readable? a 22 line condition is kinda crazy haha
There was a problem hiding this comment.
Hey @LucasWilkinson, thanks for the feedback!
The corner case here is DP+PP+PCP with TP>1 and EP enabled. DP+TP+EP normally enables SP, but this model currently disables SP when PP is enabled. Although this may be an uncommon setup (actually no one wants such weird settings!), we should still reject it explicitly. I try to simplify the logic here but it still looks complex.
I think a cleaner solution might be to support PP+SP with a tiny change (see this draft). That would let us remove this complex check altogether. What do you think of that approach?
ecc0222 to
2fbadce
Compare
Restore TP-replicated hidden states and pre-mix at PP stage exits, and shard the incoming pre-mix with the next stage inputs. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: wangyicong <wangyicong@bytedance.com>
Remove the combined PP/DP/TP/EP rejection now that PP boundaries preserve sequence-parallel inputs. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: wangyicong <wangyicong@bytedance.com>
|
Validation update (head: 3264c91):
Hey @LucasWilkinson, could you take another look when you have a chance? Since PCP now supports nearly all parallelism combinations (except for dcp), the if check can be simplified. |
|
/ci run |
|
β
Triggered Buildkite CI #98798 for commit |
Overview
Relax the model-level PCP compatibility checks for text-only DeepSeek-V4.1-Flash on NVIDIA CUDA to enable the existing PCP + PP and PCP + DP execution paths. The underlying MRV2 implementations are already provided by #59139 (PP) and #57075 (DP). No other open PR was found enabling these model-specific combinations; #49246's generic DP approach was superseded by #57075, while #63106 addresses cross-stage cache relay with PCP=1.
Claims
tests/models/test_deepseek_v41_pcp.py, using real-weight serving and generation.Validation
Hardware: 1 node with 8 H20(96G) GPUs.
Image:
vllm/vllm-openai:nightly-df3bd094aeea829f27baa0a5282830464f601d9fStartup Command:
PP+PCPοΌ
VLLM_PP_LAYER_PARTITION=14,26οΌοΌVLLM_PP_LAYER_PARTITION=14,26 vllm serve /models/DeepSeek-V4.1-Flash-1017 \ --host 0.0.0.0 --port 18001 --served-model-name deepseek-v4.1-flash \ --language-model-only --tokenizer-mode deepseek_v41 --distributed-executor-backend mp \ --attention-backend FLASHMLA_SPARSE_DSV41 --kv-cache-dtype fp8_ds_mla --block-size 64 \ --tensor-parallel-size 2 --pipeline-parallel-size 2 --data-parallel-size 1 \ --decode-context-parallel-size 1 --prefill-context-parallel-size 2 \ --enable-expert-parallel --all2all-backend allgather_reducescatter \ --engram-config '{"cpu_offload":true}' --moe-backend humming --max-model-len 131072 \ --max-num-batched-tokens 4096 --max-num-seqs 64 --gpu-memory-utilization 0.90 \ --enable-chunked-prefill --enable-prefix-caching --swa-bounded-replay \ --enforce-eager --no-async-scheduling --disable-uvicorn-access-logDP+PCPοΌ
vllm serve /models/DeepSeek-V4.1-Flash-1017 \ --host 0.0.0.0 --port 18001 --served-model-name deepseek-v4.1-flash \ --language-model-only --tokenizer-mode deepseek_v41 --distributed-executor-backend mp \ --attention-backend FLASHMLA_SPARSE_DSV41 --kv-cache-dtype fp8_ds_mla --block-size 64 \ --tensor-parallel-size 2 --pipeline-parallel-size 1 --data-parallel-size 2 \ --decode-context-parallel-size 1 --prefill-context-parallel-size 2 \ --enable-expert-parallel --all2all-backend allgather_reducescatter \ --engram-config '{"cpu_offload":true}' --moe-backend humming --max-model-len 131072 \ --max-num-batched-tokens 4096 --max-num-seqs 64 --gpu-memory-utilization 0.90 \ --enable-chunked-prefill --enable-prefix-caching --swa-bounded-replay \ --enforce-eager --no-async-scheduling --disable-uvicorn-access-log1286/1319 = 97.50%οΌ0 API errorγ1282/1319 = 97.19%οΌ0 API errorγDetails
The runtime change is confined to the NVIDIA model's compatibility checks. PP/PCP execution, stage-entry Engram handling, and DP/EP communication reuse their existing implementations. The existing PCP test file adds generation cases for the newly enabled combinations: the PP case uses Flash's
14,26partition, and the DP case sends a request to each replica.With PCP enabled, PP>1 and DP>1 are rejected only when TP>1 and expert parallelism is enabled: PP currently disables the model's sequence-parallel path required by DP+PCP AgRs MoE communication in that topology. TP=1 or disabled expert parallelism passes this combined-topology gate; these additional combinations still require GPU validation. DCP must remain 1; KV transfer, microbatching, and MegaMoE remain disabled. Preserve main's fixed-length DSpark support with PP=1 and the existing PR's exclusion of speculative decoding with PCP + PP. Prefix caching still requires SWA bounded replay.
AI assistance was used to prepare this change. The human submitter remains responsible for line-by-line review; validation beyond the two configurations reported above remains pending.
Pull Request Checklist
I used vLLM's
/pr-checklistskill. (Mandatory for agents, optional for humans).AI assistance was used during the creation of this PR.
Design Fit: Minimizes impact on core components, reuses existing functionality, and justifies added complexity.
Testing and Validation: Validates the change and ensures any added tests are meaningful and reliable, with CI coverage or documented CI resource constraints and validation performed outside CI.
Code Quality and Style: Keeps code and comments clear and concise, and updates relevant documentation and examples.
Pull Request Contents: Includes a brief summary and relevant links, supports claims with evidence, explains root causes and implementation trade-offs, and follows the contributing guide.
BEFORE SUBMITTING, PLEASE READ https://docs.vllm.ai/en/latest/contributing (anything written below this line will be removed by GitHub Actions)