[KV] Side-cache layout -- fold the PLE state into a GDN group, pack QSA rings
The packed pool strides every block by the widest group, and every group draws whole blocks. The PLE short-conv state now shares a GDN cache group, and the QSA raw-key rings are packed as equal slots inside shared blocks, so neither holds a whole block per request. VLLM_E2_SIDE_CACHE_LAYOUT (default 1) selects the old layout with 0. On its own the layout raises the Flash-Next pool from 806,792 to 853,994 tokens at the same budget. Co-Authored-By: Hinata <hinata@idihore.id> Signed-off-by: MOVZX <movzx@yahoo.com>
This commit is contained in:
@@ -458,6 +458,16 @@ if TYPE_CHECKING:
|
||||
# for A/B. AOT: no. CAPTURE: no -- scheduler-side block bookkeeping only;
|
||||
# the worker sees the same block tables either way.
|
||||
VLLM_E2_MAMBA_RETAIN_CHECKPOINT: bool = True
|
||||
# v2.5 side-cache layout (Flash-Next PLE + QSA ring): stop charging each
|
||||
# tiny side cache a whole packed pool block per request. The TP-replicated
|
||||
# PLE short-conv state group is folded into a GDN group that has a spare
|
||||
# page on every PP stage, and the one-block-per-request QSA ring group packs
|
||||
# several requests' rings into one pool block. Strict "0"/"1", default ON;
|
||||
# "0" restores the old one-group-each layout for A/B. Read in
|
||||
# vllm/v1/core/kv_cache_utils.py (get_kv_cache_configs). AOT: yes, hashed --
|
||||
# it changes the ring views' block stride and which block table the PLE
|
||||
# state is read through, so ON and OFF must not share a compile cache.
|
||||
VLLM_E2_SIDE_CACHE_LAYOUT: bool = True
|
||||
# Opt-out for the fork startup guards in vllm/v1/e2_guards.py, read at
|
||||
# Qwen4ExpForCausalLM construction. AOT: no. CAPTURE: no -- it changes
|
||||
# nothing itself; it only permits a boot whose identity IS different
|
||||
@@ -2694,6 +2704,11 @@ environment_variables: dict[str, Callable[[], Any]] = {
|
||||
"VLLM_E2_MAMBA_RETAIN_CHECKPOINT": lambda: _e2_strict_switch(
|
||||
"VLLM_E2_MAMBA_RETAIN_CHECKPOINT", default=True
|
||||
),
|
||||
# Side-cache layout (v2.5; PLE state folded into a GDN group + QSA ring slot
|
||||
# packing), default ON. Strict "0"/"1"; read once per get_kv_cache_configs call.
|
||||
"VLLM_E2_SIDE_CACHE_LAYOUT": lambda: _e2_strict_switch(
|
||||
"VLLM_E2_SIDE_CACHE_LAYOUT", default=True
|
||||
),
|
||||
# Seconds between `topk-exact-counters` lines from each GPU worker
|
||||
# (0, the default, disables the reader entirely). The line reports the
|
||||
# medium-path exact-restart counters; see
|
||||
|
||||
Reference in New Issue
Block a user