fix(vllm): retain exact recurrent sources until store completion - #34
Conversation
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>
|
@coderabbitai review |
Action performedReview triggered.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
1dce85c
into
integration/glm53-upstream-consolidation
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
connector-side positional reconstruction for the scheduled request.
touched once and released only after completion reports from all vLLM ranks.
completion counts.
receive one balanced retain/release pair.
cannot retain an exact boundary snapshot before its source is reusable.
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
report that metadata are incompatible with source retention and must not be
mixed in one engine.
lmcache_drivencuMem transfer requires feat(cuda): add shareable cuMem IPC lifecycle #33 and the allocator compatibilitychanges in fix(kv): allow engine-driven expandable segments vllm#553 through [Question] Compatible lmcache version for vllm 0.7.3 LMCache/LMCache#555.
Validation
117 passed: LMCache MP connector, metadata, hybrid-cache layout,exact-boundary, multi-store, and worker-adapter tests.
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.
tokens. A complete LMCache sidecar and vLLM restart restored the same prefix
from native-filesystem L2.
target attention blocks, and the active 2,048-token draft sliding window on
every rank.