Skip to content

fix(vllm): retain exact recurrent sources until store completion - #34

Merged
yatesdr merged 14 commits into
integration/glm53-upstream-consolidationfrom
fix/glm53-exact-recurrent-store-sources-20260901
Sep 1, 2026
Merged

fix(vllm): retain exact recurrent sources until store completion#34
yatesdr merged 14 commits into
integration/glm53-upstream-consolidationfrom
fix/glm53-exact-recurrent-store-sources-20260901

Conversation

@voipmonitor

Copy link
Copy Markdown

Purpose

An asynchronous hybrid-cache store must read the exact recurrent state that
the vLLM scheduler associated with its attention-cache prefix. Reconstructing
that state from incremental allocation deltas is unsafe because Mamba/GDN
align-mode block tables are sparse, mutable, and may release an interior state
before all tensor-parallel workers finish the store.

This pull request makes each store consume the scheduler-authoritative block
table and retains its source blocks until every worker reports terminal
completion.

Resulting behavior

  • Exact recurrent boundary handoffs and per-group block tables replace
    connector-side positional reconstruction for the scheduled request.
  • Every asynchronous store receives a durable job identifier. Source blocks are
    touched once and released only after completion reports from all vLLM ranks.
  • Concurrent stores for one request have independent identities, futures, and
    completion counts.
  • Null block placeholders are excluded and repeated source block identifiers
    receive one balanced retain/release pair.
  • Recurrent cache groups reject lazy offload because deferred job selection
    cannot retain an exact boundary snapshot before its source is reusable.
  • Scheduler heartbeats continue while retained stores still have pending worker
    completions.

Stack and attribution

This is a stacked pull request. Its branch contains the shareable cuMem runtime
from #33 unchanged, followed by one source-lifetime commit. After #33 merges,
GitHub will reduce this pull request to the source-lifetime commit.

The #33 commits retain their original authors and co-authors. The follow-up
commit is co-authored by Yifan Qiao, whose scheduler-authoritative recurrent
boundary work defines the vLLM interface consumed here.

The corresponding vLLM scheduler interface is reviewed in
local-inference-lab/vllm#557.

Compatibility

Validation

  • 117 passed: LMCache MP connector, metadata, hybrid-cache layout,
    exact-boundary, multi-store, and worker-adapter tests.
  • Ruff formatting and lint checks passed.
  • TP4 byte-level qualification on four NVIDIA RTX PRO 6000 Blackwell
    Workstation Edition GPUs restored 8,192 external tokens into disjoint block
    allocations and matched every live recurrent and attention-cache byte on all
    four ranks for no-speculative, MTP:3, and DFlash2 serving.
  • DRAM L1 and native-filesystem L2 qualification each restored 12,288 external
    tokens. A complete LMCache sidecar and vLLM restart restored the same prefix
    from native-filesystem L2.
  • DFlash2 DCP4 full-CKV qualification matched four recurrent groups, rank-local
    target attention blocks, and the active 2,048-token draft sliding window on
    every rank.

Apple FCU Fleet and others added 14 commits August 31, 2026 15:25
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Avoid suppressing completed recurrent chunks when scheduler accounting advances ahead of exact boundary handoffs.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Advertise the scheduler fence only for LMCache MP producers with recurrent cache groups so ordinary and consumer configurations retain run-ahead.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use the scheduler-provided KV block-table snapshot and exact recurrent boundary handoffs for each hybrid-cache store. Assign each asynchronous store a durable job identity, retain its source blocks in the vLLM block pool, and release them only after all workers report terminal completion.

Recurrent cache groups reject lazy offload because a deferred selection cannot retain boundary snapshots safely. Concurrent stores for one request keep independent futures and completion accounting.

Validation: 117 targeted LMCache MP connector, metadata, hybrid-cache, layout, and worker-adapter tests pass.

Co-authored-by: Yifan Qiao <yifanqiao@inferact.ai>
@voipmonitor

Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown
Action performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • dev/*

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 08c7e74d-b974-49c4-bb27-c062edef769c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/glm53-exact-recurrent-store-sources-20260901

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@yatesdr
yatesdr merged commit 1dce85c into integration/glm53-upstream-consolidation Sep 1, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants