bugfix: pass estimated linear state slots.#1943
Merged
Merged
Conversation
yingxudeng
approved these changes
Jul 14, 2026
zhang-minchao
approved these changes
Jul 14, 2026
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.
问题
PR #1846 为混合线性注意力模型启用了 LINEAR block manager。KV Cache 容量估算已经生成
num_linear_state_blocks,并使用该数量分配 Conv/SSM state cache;但 LLM/VLM engine 创建BlockManagerPool时没有继续传递该值。因此,Qwen3Next、Qwen3.5 等模型会以
enable_linear_state=true和默认的linear_state_num_slots=0创建 block manager,并在服务 ready 前触发:修改
kv_cache_cap.num_linear_state_blocks()传给BlockManagerPool::Options::linear_state_num_slots。该修改只补齐容量估算到 block manager 的参数传递,不改变 slot 数计算方式,也不引入后续 linear-state prefix-cache 的 restore 或 checkpoint-stride 功能。
影响
enable_linear_state=false,不使用 LINEAR leaf。关联