[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:
@@ -1619,6 +1619,10 @@ class Scheduler(SchedulerInterface):
|
||||
pending = set(block_ids)
|
||||
owners: dict[int, set[str]] = {}
|
||||
for mgr in self.kv_cache_manager.coordinator.single_type_managers:
|
||||
if getattr(mgr, "slot_pool", None) is not None:
|
||||
# v2.5 slot-packed ring: its block ids are slot ids, not pool
|
||||
# block ids, and its pages are never zeroed.
|
||||
continue
|
||||
for req_id, blocks in mgr.req_to_blocks.items():
|
||||
for blk in blocks:
|
||||
if blk.block_id in pending:
|
||||
|
||||
Reference in New Issue
Block a user