[feat] Support UCM hybrid KV cache connector for mixed Mamba/Attention block layouts#957
Open
wangwenxin0312 wants to merge 5 commits into
Open
[feat] Support UCM hybrid KV cache connector for mixed Mamba/Attention block layouts#957wangwenxin0312 wants to merge 5 commits into
wangwenxin0312 wants to merge 5 commits into
Conversation
ygwpz
reviewed
May 14, 2026
| ``request.all_token_ids`` with group ``gid``'s own block size and | ||
| chain seed. ``group_ucm_block_ids[full_attn_group_id]`` equals the | ||
| inherited ``ucm_block_ids``. | ||
| - ``group_vllm_block_ids[gid]``: per-group VLLM physical block ids; this |
Contributor
There was a problem hiding this comment.
💡 Note: TODO/FIXME marker found. Consider addressing before merge or creating a tracked issue.
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.
Purpose
Add UCM support for vLLM hybrid/HMA KV cache layouts, including group-aware block hashing, external cache lookup, and load/dump metadata generation for mixed full-attention and sliding-window cache groups.
Modifications
KVCacheGroupManagerto parsekv_cache_groups, derive per-group hash chains, and validate group block/window alignment.lookup_on_prefixlookupHMAKVCacheLayoutto build cache memory layout fromkv_cache_tensorsand per-layer KV cache specs.UCMHMAConnectorfor scheduler-side hit detection and worker-side KV cache registration.Test
export ENABLE_UCM_PATCH=1
export MODEL_PATH="/home/models/Qwen3-Next-80B-A3B-Instruct/"
python unified-cache-management/examples/offline_inference.py