Repository navigation
Conversation
Core hands the connector only the Mamba state page of a prompt-tail boundary. When the boundary falls inside an attention block, resuming the prefix there also needs that block's page, which UMBP never stored, so a later turn could only resume from an older boundary inside fully stored blocks. Store the attention page with each handed-off boundary. With EAGLE's block drop the lookup coordinator matches attention one lookup unit past a candidate before dropping that unit, so the page is keyed one unit after the boundary, where core registers its own partial tail. The request-finished path now keys its attention page the same way. Signed-off-by: yutongwu <yutongwu@amd.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
UMBP stores only the Mamba state page core hands off at a prompt-tail boundary. When that boundary falls inside an attention block, resuming there also needs the attention block's page, which UMBP never stores, so a Mamba hybrid restores from an older boundary or not at all. This PR stores that page with each handed-off boundary.
Claims
prefix_match_unitis finer than the attention block. Granite 4.0-H 350M: 0 → 832 restored tokens, with identical tokens and logprobs.Validation
MI355X,
vllm/vllm-openai-rocm:nightly-40941f2c(MORI 1.2.3.post1 with UMBP) with this branch'sumbp/directory.Unit tests:
pytest -q tests/v1/kv_connector/unit/test_umbp_*.pygives 234 passed. Three of the four new cases fail on main. The non-EAGLE finished-path case already passes there and guards the keying rule.New end-to-end regression test, one GPU:
Granite 4.0-H 350M,
prefix_match_unit=16, 400-token blocks, 840-token prompt; the tail checkpoint sits at 832:AssertionError: assert 0 == 832Kimi K3 1P1D (TP8/DCP8 each, DSpark,
prefix_match_unit128, embedded UMBP 1799 GB on P, agentic trace at concurrency 70, 1 h):Pending: the Kimi K3 c70 runs are in progress.
Details
Request flow on the prefill instance:
b, inside attention blockk, and hands that state page to UMBP (boundary_state_offloads).0..k-1and the state atb. Attention blockk, holding tokens[k*B, b), is never stored. The finished path stores it only when the request stops exactly atb.bbut attention stops atk*B, so the coordinator settles on an older boundary, or on none when only the tail checkpoint is retained (prefix_cache_retention_interval=0, the default).kkeyed atb, and turn 2 resumes atb.Key position: the coordinator matches an EAGLE group one lookup unit past a candidate and then drops that unit. For groups whose manager has
use_eagle, the page is keyed atb + unit; otherwise atb. Reading this from the coordinator keeps it correct for DFlash/DSpark, which skip the drop, and if vllm-project#65448 changes when the drop applies. A block-aligned end is a full block and is stored with its prefix.Cost: one more attention page per handed-off boundary. On Kimi K3 that is about a third of a KDA checkpoint.
Not a duplicate: no open PR stores attention pages at hybrid boundaries. vllm-project#64656 adds a hybrid restore test whose prompts end on block boundaries, without a fine
prefix_match_unit, where this change has no effect. Both tests use the same model, so whichever lands second can share the fixture.AI assistance was used for this change and description. The submitter reviewed every line and ran the tests above.
Pull Request Checklist
I used vLLM's
/pr-checklistskill. (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.