engine: the one-sequence KV floor is the live plan's inverse, its state slots included

The floor a KV pool must keep for one --max-model-len request came from a separate plan at
max_seqs 1. A hybrid model's recurrent and conv slots are fixed per configured sequence and stay
allocated while one request is active, so that plan undercounted and the pool it allowed could
not hold max_ctx. The floor is now pool_mib_for_tokens over the real plan's groups. mem_test
(hybrid_context_floor_accounts_for_all_configured_state_slots).
This commit is contained in:
John McDonough authored and StillDeadcode committed 2026-10-19 20:13:47 +02:00
1 parent 385754f44f
commit 2c67e93342
3 files changed
+33 -13

No files matched your search

+1 -1
View File
@@ -75,7 +75,7 @@ struct VramFacts {
/* Experts the pinned host pool cannot hold, plus the slab's spare slots: the expert slab's
* floor when the cache lends (expert_vram_floor, core/place/planner.h). */
int64_t expert_floor = 0;
int64_t kv_one = 0; /* the cache for one --max-model-len sequence: the least it may get */
int64_t kv_one = 0; /* all configured fixed state plus pages for one full-length context */
/* The cache lends idle blocks to the expert slab: a placement that moves units (expert_tiered
* or auto), not --deterministic, on a device with virtual memory management. A lending cache
* can be sized for what live requests could need; a non-lending one would hold it empty. */