Skip to content

[Feature][DSv4.1][NIXL] Enable PCP Prefill with NIXL P/D - #61746

Draft
wangyicong52 wants to merge 2 commits into
vllm-project:mainfrom
wangyicong52:feat/dsv41-pcp-nixl
Draft

wangyicong52 wants to merge 2 commits into
vllm-project:mainfrom
wangyicong52:feat/dsv41-pcp-nixl

Conversation

@wangyicong52

@wangyicong52 wangyicong52 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Overview

Follow-up to #59857, enabling text-only DeepSeek-V4.1-Flash PCP Prefill with NIXL P/D. Stacked on #59325 for replicated-PCP producer completion.

Claims

  • Allow GPU NixlConnector pull producers to use PCP, with PCP=1 on Decode.
  • Allow fixed-length DSpark and optional APC with SWA bounded replay.
  • Retain PP=DP=DCP=1 and synchronous scheduling. Consumer PCP, push, bidirectional transfer and custom connector paths remain unsupported.

Validation

Image

vllm/vllm-openai:nightly-edad8b03c5285a1c12e7e4f83c1af709b319a01b

Official linux/amd64 digest: sha256:d31ecffc8a9613b1f7c6c849a45e01bb9f0ac86a177f7dd802f29b4e51390198.

Software

vLLM startup

Relevant environment:

export VLLM_USE_V2_MODEL_RUNNER=1
export VLLM_NIXL_SIDE_CHANNEL_HOST=<LOCAL_ROLE_HOST>
export VLLM_NIXL_SIDE_CHANNEL_PORT=5600
export UCX_TLS=all
export UCX_NET_DEVICES=<RDMA_DEVICES>
export NCCL_IB_DISABLE=1
export NCCL_SOCKET_IFNAME=<SOCKET_IFACE>
export GLOO_SOCKET_IFNAME=<SOCKET_IFACE>

Prefill (TP2/PCP4):

vllm serve <MODEL_PATH> \
  --host 0.0.0.0 \
  --port 18001 \
  --served-model-name deepseek-v4.1-flash \
  --trust-remote-code \
  --language-model-only \
  --tokenizer-mode deepseek_v41 \
  --reasoning-parser 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 1 \
  --decode-context-parallel-size 1 \
  --prefill-context-parallel-size 4 \
  --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 \
  --speculative-config '{"method":"dspark","num_speculative_tokens":5}' \
  --enforce-eager \
  --no-async-scheduling \
  --disable-uvicorn-access-log \
  --kv-transfer-config '{"kv_connector":"NixlConnector","kv_role":"kv_producer","kv_buffer_device":"cuda","kv_load_failure_policy":"fail"}'

Decode (TP8/PCP1):

vllm serve <MODEL_PATH> \
  --host 0.0.0.0 \
  --port 18002 \
  --served-model-name deepseek-v4.1-flash \
  --trust-remote-code \
  --language-model-only \
  --tokenizer-mode deepseek_v41 \
  --reasoning-parser deepseek_v41 \
  --distributed-executor-backend mp \
  --attention-backend FLASHMLA_SPARSE_DSV41 \
  --kv-cache-dtype fp8_ds_mla \
  --block-size 64 \
  --tensor-parallel-size 8 \
  --pipeline-parallel-size 1 \
  --data-parallel-size 1 \
  --decode-context-parallel-size 1 \
  --prefill-context-parallel-size 1 \
  --enable-expert-parallel \
  --all2all-backend allgather_reducescatter \
  --engram-config '{"cpu_offload":true}' \
  --moe-backend humming \
  --max-model-len 131072 \
  --max-num-batched-tokens 2048 \
  --max-num-seqs 64 \
  --gpu-memory-utilization 0.90 \
  --enable-chunked-prefill \
  --enable-prefix-caching \
  --swa-bounded-replay \
  --speculative-config '{"method":"dspark","num_speculative_tokens":5}' \
  --enforce-eager \
  --no-async-scheduling \
  --disable-uvicorn-access-log \
  --kv-transfer-config '{"kv_connector":"NixlConnector","kv_role":"kv_consumer","kv_buffer_device":"cuda","kv_load_failure_policy":"fail"}'

GSM8K

EvalScope version: 1.11.1.

evalscope eval \
  --eval-type openai_api \
  --api-url http://<ROUTER_HOST>:30000/v1 \
  --api-key EMPTY \
  --model deepseek-v4.1-flash \
  --model-id deepseek-v4.1-flash \
  --datasets gsm8k \
  --dataset-hub modelscope \
  --dataset-args '{"gsm8k":{"few_shot_num":4}}' \
  --seed 42 \
  --eval-batch-size 64 \
  --generation-config '{"temperature":0.0,"top_p":1.0,"max_tokens":8192,"reasoning_effort":"high","seed":42,"timeout":10000}' \
  --timeout 10000 \
  --work-dir <WORK_DIR> \
  --no-timestamp
  • Result: 1283 / 1319 correct (97.2707%), within the local historical control range of 1279-1286 / 1319.
  • Execution: 1319 / 1319 requests succeeded with 0 API errors; 3 responses reached the 8192-token limit.
  • Truncation diagnostic: a separate 65536-token replay recovered correct final answers for 2 of the 3 truncated samples; the primary score was not replaced.
  • NIXL: 10,552 successful rank transfers and 53,282,008,576 transferred bytes, with 0 failed transfers, notification failures, or KV expirations.
  • Health: 0 preemptions and 0 service restarts.
  • Cache-state note: prefix-cache reset endpoints were unavailable because the servers were not launched in dev mode; both roles were idle with zero active KV usage before the run.

Details

Keep the capability checks in the NVIDIA model and reuse the existing cache-transfer path. Add one focused PCP+NIXL configuration test. The completion fix is inherited from #59325.

AI assistance was used for implementation and tests.


Pull Request Checklist
  • I used vLLM's /pr-checklist skill. (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.

@mergify

mergify Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Documentation preview: https://vllm--61746.org.readthedocs.build/en/61746/

@mergify mergify Bot added documentation Improvements or additions to documentation ci/build deepseek Related to DeepSeek models DSv4.1 Related to DeepSeek-V4.1 models kv-connector mooncake Mooncake KV-transfer / EC-transfer kv-cache-manager labels Oct 15, 2026
@mergify

mergify Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @wangyicong52.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify

mergify Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @wangyicong52.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify

mergify Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @wangyicong52.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify

mergify Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @wangyicong52.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

…ucer ranks

vllm-project#53903 made replicated-PCP producer ranks > 0 report every request they
were asked to send as done, so that the world_size aggregation in
KVOutputAggregator completes, and removed the code that hid those
completions from get_finished(). vllm-project#53781 then added
NixlBaseConnector.get_transfer_results(), which the model runner now
calls instead of get_finished(), with the old clear() for those ranks
carried over. The synthetic completions were dropped again, the
aggregator waited for pcp_size reports and received one, and the
prefill side never freed a finished request's blocks.

Return the worker's results unchanged, as get_finished() does. Update
the handshake test that asserted the empty set, and add an aggregator
test for a PCP=2 replicated producer.

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Sohom Chakraborty <16609933+sohom-cs@users.noreply.github.com>
(cherry picked from commit 87e86bf)
Allow GPU NixlConnector pull producers to use DeepSeek-V4.1 PCP,
including fixed-length DSpark and APC with SWA bounded replay.
Retain PP=DP=DCP=1, synchronous scheduling and the existing backend,
consumer-PCP, push, bidirectional and custom-connector restrictions.

Build on merged vllm-project#59857 and vllm-project#61994 plus the replicated-PCP completion
fix from vllm-project#59325. Keep the capability policy and tests model-local.
The vllm-project#59330 handoff stack is intentionally excluded; this change does
not repair the ordinary SWA P/D N/N-1 boundary. Current-head GPU,
uncapped quality and performance validation remain pending.

Co-authored-by: OpenAI Codex <noreply@openai.com>
Signed-off-by: wangyicong <wangyicong@bytedance.com>
@wangyicong52 wangyicong52 changed the title [Feature][DSv4.1][NIXL] Support PCP Prefill with NIXL P/D [Feature][DSv4.1][NIXL] Enable PCP Prefill with NIXL P/D Oct 28, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/build deepseek Related to DeepSeek models documentation Improvements or additions to documentation DSv4.1 Related to DeepSeek-V4.1 models kv-cache-manager kv-connector mooncake Mooncake KV-transfer / EC-transfer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants