[Feature][Core] Prefix checkpoint coordination and same-step pairing in V1 scheduler - #55875
nicholaskh-ai wants to merge 3 commits into
Conversation
|
This pull request has merge conflicts that must be resolved before it can be |
|
Hi reviewers, this is Part 2 of the implementation stack for RFC #55697. It adds scheduler-level checkpoint truncation, same-step Producer/Consumer pairing, and the unready/ready state machine in V1 scheduler. Whenever you have a moment, we would appreciate your feedback. Thanks! |
c8db32b to
5e7228e
Compare
|
This pull request has merge conflicts that must be resolved before it can be |
5e7228e to
6183fb1
Compare
eba6359 to
297c208
Compare
yewentao256
left a comment
There was a problem hiding this comment.
Thanks for the work! Will this apply to MRv2? We will deprecate V1 soon
|
Hi @yewentao256, thanks for the review and great question! Yes, absolutely! Here is the compatibility breakdown across the stack:
|
…rker and input processing - Add --enable-mamba-checkpoint and --mamba-checkpoint-token CLI & engine options - Register <|mamba_checkpoint|> token into tokenizer dynamically in HF renderer - Parse and strip mamba checkpoint token in InputProcessor with offset adjustments - Add unit tests for HF renderer and InputProcessor token extraction Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Signed-off-by: nizhang1 <nizhang1@coupang.com>
…1 scheduler - Truncate Producer prefill chunks at mamba checkpoint boundary - Support same-step Producer/Consumer pairing and prefix block inheritance - Implement unready checkpoint locking in BlockPool and deferral in scheduler - Add ready state wakeup on step completion - Add unit tests for scheduler checkpoint coordination and chunk splitting Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Signed-off-by: nizhang1 <nizhang1@coupang.com>
297c208 to
a054f9b
Compare
|
Update: We have implemented native MRv2 compatibility in PR #55876!
The entire 3-PR stack is rebased, clean, conflict-free, and fully verified for both MRv1 and MRv2! |
|
This pull request has merge conflicts that must be resolved before it can be |
Document the exact single-session HOT design, relationship to existing Mamba prefix-cache work (vllm-project#55697/vllm-project#55873/vllm-project#55875/vllm-project#55876, vllm-project#52959, vllm-project#45702), TTFT evaluation, correctness status, and async-scheduling limitations. Co-authored-by: OpenAI Codex <codex@openai.com> Signed-off-by: KonnyakuLC <1690982212@qq.com>
Signed-off-by: nicholaskh-ai <15652918035@163.com>
Purpose
Implements RFC #55697.
Part 2 of 3 for Application-Directed Mamba Prefix Checkpointing (depends on PR #55873).
This PR introduces scheduler coordination, checkpoint boundary chunk splitting, and a dependency state machine for hybrid Mamba/GDN models in the V1 engine:
mamba_checkpoint_positionso that the recorded state snapshot is anchored precisely at the checkpoint boundary.BlockPoolto prevent concurrent consumers from reading uncomputed states. Consumers arriving while the checkpoint is unready are deferred (waiting_for_mamba_checkpoint = True) and prepended tostep_skipped_waitingwithout blocking unrelated requests.mark_checkpoint_ready()unlocks the block hash, resuming deferred consumers as normal cache hits.mamba_prefix_producer_id, enabling them to execute in the same engine step.Duplicate-work Check
Test Plan
pytest tests/v1/core/test_mamba_checkpoint_scheduler.py -vpytest tests/v1/core/test_mamba_align_chunk_split.py -k "test_internal_checkpoint_split" -vAI assistance was used to prepare this change. The human submitter is responsible for reviewing the changed code and test results.
Generated with Devin
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Signed-off-by: nizhang1 nizhang1@coupang.com