[Core][Feat] Pluggable KVCacheConfigBuilder for platform/model-specific KV cache planning - #53558
wangxiyuan wants to merge 2 commits into
Conversation
531d4e9 to
0cd95bd
Compare
|
This pull request has merge conflicts that must be resolved before it can be |
0cd95bd to
a408951
Compare
|
✅ @wangxiyuan, CI is now available for this PR.
|
The branch is merged after vllm-project/vllm#53558 lands, so the try/except import fallbacks in worker.py and the dynamic patch target in patch_kv_cache_utils.py are no longer needed: the KV cache planning entry points are always in vllm.v1.core.kv_cache_planning. Signed-off-by: yangzeyu <532183776@qq.com>
The branch merges after vllm-project/vllm#53558, so the superseded DeepSeekV4 planning monkey-patches and the pre-#53558 kv_cache_utils targets are dropped: - patch/platform/patch_kv_cache_utils.py: keep only resolve_kv_cache_block_sizes, the Kimi K3 DSpark grouping, KVCacheConfig.has_mamba_layers and the GLM5-Next cache layout (ported from main), all wired to vllm.v1.core.kv_cache_planning. DeepSeekV4 planning lives in AscendKVCacheConfigBuilder. - tests/ut: restore the builder-based assertions for test_prefix_cache_cp_patches.py and test_attn_utils_v2.py. Signed-off-by: yangzeyu <532183776@qq.com>
The branch merges after vllm-project/vllm#53558, so the superseded DeepSeekV4 planning monkey-patches and the pre-#53558 kv_cache_utils targets are dropped: - patch/platform/patch_kv_cache_utils.py: keep only resolve_kv_cache_block_sizes, the Kimi K3 DSpark grouping, KVCacheConfig.has_mamba_layers and the GLM5-Next cache layout (ported from main), all wired to vllm.v1.core.kv_cache_planning. DeepSeekV4 planning lives in AscendKVCacheConfigBuilder. - tests/ut: restore the builder-based assertions for test_prefix_cache_cp_patches.py and test_attn_utils_v2.py. Signed-off-by: yangzeyu <532183776@qq.com>
35a8b5a to
604e7c4
Compare
|
/ci run |
|
✅ Triggered Buildkite CI #88075 for commit |
|
This pull request has merge conflicts that must be resolved before it can be |
c264025 to
70c1f9f
Compare
|
/ci run |
|
✅ Triggered Buildkite CI #88712 for commit |
70c1f9f to
d921fa3
Compare
|
/ci run |
|
✅ Triggered Buildkite CI #88755 for commit |
|
This pull request has merge conflicts that must be resolved before it can be |
…ic KV cache planning Signed-off-by: wangxiyuan <wangxiyuan1007@gmail.com>
d921fa3 to
ee06d03
Compare
|
/ci run |
|
❌ This PR is 11 commits behind upstream |
|
/ci run |
|
✅ Triggered Buildkite CI #89032 for commit |
Purpose
Pick from #42309 to follow up kv cache config builder implementation.
Add a pluggable KVCacheConfigBuilder so platforms or models can override KV cache planning end-to-end. Resolution order: platform override > model declaration > default. Default builder forwards to existing get_kv_cache_configs, so behavior is unchanged today.
Test Plan
Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.Co-Authored-By: Yifan Qiao yifanqiao@inferact.ai
Co-Authored-By: Mengqing Cao cmq0113@163.com