Skip to content

fix(vllm): align KVBM decode KV cache layout - #12821

Merged
jthomson04 merged 2 commits into
mainfrom
jthomson04/fix-pdconnector-kvbm
Aug 10, 2026
Merged

jthomson04 merged 2 commits into
mainfrom
jthomson04/fix-pdconnector-kvbm

Conversation

@jthomson04

@jthomson04 jthomson04 commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Fixes DYN-3545.

Summary

  • Configure KVBM prefill and decode workers with --disable-hybrid-kv-cache-manager so both sides use the same vLLM KV-cache layout.
  • Mark decode workers explicitly with --disaggregation-mode decode and apply the matching decode-side configuration to the LMCache and FlexKV PdConnector launchers.
  • Give the disaggregated KVBM integration-test prefiller a distinct NIXL side-channel port.
  • Apply the KVBM worker configuration consistently across local launchers, current DynamoGraphDeployment examples, and the existing disaggregated integration test.

The unpatched 1.3.0-rc.9 launcher reproduced a NIXL compatibility-hash mismatch followed by handshake and KV-load failures. PdConnector disables the vLLM hybrid KV-cache manager when a child connector does not support it, while the paired plain NixlConnector decoder previously kept it enabled.

Validation

  • Ran the final patched examples/backends/vllm/launch/disagg_kvbm.sh with nvcr.io/nvstaging/ai-dynamo/vllm-runtime:1.3.0-rc.9, Qwen/Qwen3-0.6B, and a 1-prefill/1-decode two-GPU topology.
    • /v1/models listed Qwen/Qwen3-0.6B.
    • /v1/chat/completions returned HTTP 200 through distinct prefill and decode workers.
    • NIXL reported that the compatibility check passed, and transfer metrics recorded one successful KV transfer.
    • Complete logs contained no compatibility-hash mismatch, handshake failure, KV-load failure, or frontend finish-reason deserialization error.
    • The existing VRAM_SEG registration warnings remained but did not prevent successful inference; transport registration changes are outside this PR.
  • Ran the patched LMCache launcher with the same image, model, and two-GPU topology; model readiness and chat completion passed with no compatibility-hash, handshake, or KV-load errors.
  • Verified that the FlexKV launcher accepts the new worker arguments and that its decode worker initializes NIXL with the HND layout. Full FlexKV inference could not run because the 1.3.0-rc.9 image does not include the optional flexkv Python package.
  • bash -n passed for all five modified PdConnector launchers.
  • Parsed all three modified deployment manifests with yaml.safe_load and compiled the modified Python test source.
  • Collected tests/kvbm_integration/test_determinism_disagg.py::TestDeterminismDisagg::test_determinism_disagg_with_cache_reset successfully in the vLLM runtime image.
  • git diff --check

Signed-off-by: jthomson04 <jwillthomson19@gmail.com>
@github-actions github-actions Bot added fix backend::vllm Relates to the vllm backend labels Aug 7, 2026
@jthomson04
jthomson04 marked this pull request as ready for review August 7, 2026 17:10
@jthomson04
jthomson04 requested review from a team as code owners August 7, 2026 17:10

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 2 potential issues.

Open in Devin Review

@datadog-official

This comment has been minimized.

@coderabbitai

coderabbitai Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The changes update vLLM decode worker deployments, launch scripts, and the determinism integration test. Decode workers now disable the hybrid KV cache manager. The relevant commands also specify disaggregated decode mode.

Changes

Disaggregated decode configuration

Layer / File(s) Summary
Decode worker runtime arguments
examples/backends/vllm/deploy/disagg_kvbm*.yaml, examples/backends/vllm/launch/disagg_kvbm*.sh
Deployment manifests and launch scripts pass --disable-hybrid-kv-cache-manager. The primary launch script also passes --disaggregation-mode decode.
Determinism integration command
tests/kvbm_integration/test_determinism_disagg.py
The decoder command passes disaggregated decode mode and disables the hybrid KV cache manager.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main change: aligning the KVBM decode KV-cache layout.
Description check ✅ Passed The description explains the change, affected areas, related issue, validation, and known limitation in sufficient detail.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@examples/backends/vllm/launch/disagg_kvbm.sh`:
- Line 21: Ensure every prefill worker includes
--disable-hybrid-kv-cache-manager, matching the existing decode-worker
workaround. Update the prefill commands in
examples/backends/vllm/launch/disagg_kvbm.sh:21, disagg_kvbm_2p2d.sh:21-23, and
both prefill commands in disagg_kvbm_router.sh:30 and :38; update the prefill
components in examples/backends/vllm/deploy/disagg_kvbm.yaml:27,
disagg_kvbm_2p2d.yaml:27, and disagg_kvbm_tp2.yaml:27; and update
self.prefiller_cmd in tests/kvbm_integration/test_determinism_disagg.py:152-154.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 8a587876-ebc4-4eeb-9418-fa84ddb89926

📥 Commits

Reviewing files that changed from the base of the PR and between cd6b63b and fde8962.

📒 Files selected for processing (7)
  • examples/backends/vllm/deploy/disagg_kvbm.yaml
  • examples/backends/vllm/deploy/disagg_kvbm_2p2d.yaml
  • examples/backends/vllm/deploy/disagg_kvbm_tp2.yaml
  • examples/backends/vllm/launch/disagg_kvbm.sh
  • examples/backends/vllm/launch/disagg_kvbm_2p2d.sh
  • examples/backends/vllm/launch/disagg_kvbm_router.sh
  • tests/kvbm_integration/test_determinism_disagg.py

Signed-off-by: jthomson04 <jwillthomson19@gmail.com>
@pull-request-size pull-request-size Bot added size/M and removed size/S labels Aug 7, 2026
@jthomson04
jthomson04 enabled auto-merge (squash) August 7, 2026 17:43
@jthomson04
jthomson04 merged commit b9c468e into main Aug 10, 2026
113 of 114 checks passed
@jthomson04
jthomson04 deleted the jthomson04/fix-pdconnector-kvbm branch August 10, 2026 16:01
pvijayakrish pushed a commit that referenced this pull request Aug 10, 2026
…2940)

Signed-off-by: jthomson04 <jwillthomson19@gmail.com>
dagil-nvidia added a commit that referenced this pull request Aug 26, 2026
The reason clause said the KVBM examples and manifests are not receiving
new investment, which reads as inconsistent with the runtime work that
shipped in the same release: the clear_kv_blocks endpoint (#11451), the
decode KV-cache alignment fix (#12821), and the PdConnector HMA disable
(#11608).

Name the surface the statement is actually about. The known-issues entry
now scopes it to the KVBM examples tree, and the qwen3-32b gap note
scopes it to that walkthrough's docs. Neither claims anything about the
component as a whole.

Signed-off-by: Dan Gil <dagil@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend::vllm Relates to the vllm backend fix size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants