Repository navigation
[BugFix][v0.34.0][KV Pool] Recover partial hybrid prefixes with MTP - #24533
Dwight2458 wants to merge 8 commits into
Conversation
Bulk Memcache currently disables lookahead hashing, so an MTP replay can drop its only locally cached block and reload it from the pool. Propagate lookahead to Store lookup, checkpoint masks and cache events so the same boundary proof governs both cache tiers. Verify the warm HBM hit, cold pool fallback, boundary divergence and save retry with AscendStore CPU tests. The GLM-5.3 A3 and P/D regressions need NPU coverage. Signed-off-by: Dwight2458 <bfk371327@gmail.com> (cherry picked from commit f3559d2) Signed-off-by: Dwight2458 <bfk371327@gmail.com>
Describe the change in warm prefix reuse and the need for matching settings across P/D peers. Signed-off-by: Dwight2458 <bfk371327@gmail.com> (cherry picked from commit 6370645) Signed-off-by: Dwight2458 <bfk371327@gmail.com>
Signed-off-by: Dwight2458 <bfk371327@gmail.com> (cherry picked from commit 7686523) Signed-off-by: Dwight2458 <bfk371327@gmail.com>
Skip the draft group's tail drop when block hashes cover the lookahead. This lets full attention and Mamba reuse their shared checkpoint on a warm replay. Keep the existing drop policy for unhashed lookups. Cover one- and five-page replays through both hybrid lookup entry points. Type the external checkpoint boundaries for both ranges and tuples. Signed-off-by: Dwight2458 <bfk371327@gmail.com> (cherry picked from commit 65fde5d) Signed-off-by: Dwight2458 <bfk371327@gmail.com>
Signed-off-by: Dwight2458 <bfk371327@gmail.com>
For partial hybrid cache hits with plain HBM hashes, use Core's lookahead hash for freshly established external pages. Compare both chains under their own lookup rules and load the winning keys. Keep legacy writes when the admitted prefix includes unverified local KV. Release Core CPU tests: 1400 passed, 12 skipped in the AscendStore unit suite. Signed-off-by: Dwight2458 <bfk371327@gmail.com>
Check the external lookahead chain independently before composing it with HBM. When every required page and rank is present, load the suffix beyond the local hit. Keep the conservative EAGLE lookup for sparse external prefixes. Signed-off-by: Dwight2458 <bfk371327@gmail.com>
Signed-off-by: Dwight2458 <bfk371327@gmail.com>
|
👋 Hi! Thank you for contributing to the vLLM Ascend project. The following points will speed up your PR merge:
If CI fails, you can run linting and testing checks locally according Contributing and Testing. 🤖 How to trigger CI
Note Until the CI gate has run on a commit, the required Tip 💡 Consider Linking a Related Issue or RFCYour PR title contains the [BugFix] tag, indicating a bug fix or new feature. Linking a related issue or RFC in the PR description is strongly encouraged — it gives reviewers helpful context and speeds up the review. You can use any of these keywords:
🙏 Thanks for helping us keep the project well-organized! |
There was a problem hiding this comment.
Code Review
This pull request introduces support for lookahead hashing in the Ascend KV cache store, enabling more efficient cache hits and handling of draft model lookahead tokens. The changes include updates to the AscendStoreCoordinator and KVPoolScheduler to manage lookahead tokens, additions to the PoolBlockHashes utility, and corresponding updates to the connector and lookup logic. Several unit tests were added or updated to verify the new lookahead-aware cache recovery and lookup behavior. I have no feedback to provide as the changes are well-structured and include necessary test coverage.
Coverage
More info see: Summary |
What this PR does / why we need it?
This PR depends on #24473. Please merge that PR first. Its commits are in this branch so the combined behavior can be reviewed and tested.
With hybrid attention and Mamba checkpoints, an MTP draft page can depend on tokens just beyond a hash boundary. vLLM v0.34.0 allows plain HBM hashes. In this mode the old external lookup can reject a valid checkpoint unless an entire additional PMU matches. The change reuses Core's lookahead hasher for external pages whose producer inputs are known. It checks ordinary keys with their existing policy and can check the exact keys through an optional frame on the existing lookup RPC. The worker verifies stored objects on the participating ranks. GET uses the winning hash chain and physical page boundaries from that lookup.
An external prefix verified from token zero can extend a local hit. When an external ancestor is missing, combining HBM and the available external suffix keeps the conservative check. A writer that adopted an unverified local prefix continues publishing ordinary keys. Each page is published under one chain. The lookahead length comes from the resolved drafter configuration. On the single-module test model it was one token even with three speculative tokens.
Does this PR introduce any user-facing change?
Eligible cold reads can reuse a longer prefix. The change requires a recurrent checkpoint at the requested boundary. Existing ordinary entries remain readable. An older reader can miss entries written only under the exact hashes and recompute them. In the affected mode a request may perform one additional lookup and maintain an additional in-memory hash chain. Configuration syntax and backend key formats stay the same.
How was this patch tested?
Testing checklist
Boundary and edge-case coverage
Regression tests for the missed checkpoint and mixed HBM/external recovery
Incomplete external pages and missing rank coverage
Actual request hashes and physical page reads
vLLM main: vllm-project/vllm@c410543