fix(vllm): preserve hybrid block tables for external KV - #354
Merged
Conversation
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.
Problem
vLLM's current hybrid memory allocator passes only the blocks allocated in the current scheduler step through
NewRequestData.block_ids. The dfkv connector treated that field as the complete request block table. On GLM-5.3-Flash (MLA/DSA/KDA hybrid cache), this caused asynchronous saves to fail with short block tables on TP ranks.Stateful groups add two related constraints:
The old uniform-block fast path therefore generated keys that could never be stored, and lookup convergence discarded otherwise complete sparse stateful prefixes.
Fix
update_state_after_allocand use it for new-request metadata.Validation
Runtime:
vllm/vllm-openai:glm53-flash(g487ecf187), GLM-5.3-Flash native FP8, TP4, B200, dfkv v2.23.2 RDMA.FINAL_TESTS_PASS.block table has 0 ids.All tests used a source process followed by a separate cold target process.