Measured: scattered-token KV eviction frees zero pages under paged allocation #32384
Replies: 1 comment 1 reply
|
so i actually dealt with this when i was messing with kv cache eviction for a custom llama v2 inference server. not gonna lie, the scattered-token eviction sounded clever at first, but in practice with paged allocators (i used both for contiguous windows, memory gets freed reliably, guess the alignment lets the allocator reclaim those pages. i tried something like: # Evicting a full window aligned to 16 tokens
evict_window(start=page_start, length=16)and that worked, but scattered evicts just left the memory hanging. i even dumped stats from honestly, i started thinking about bitmaps for page occupancy and tried grouping token eviction by page index, but it got messy and added latency. radix-style attention could maybe batch up evicts, but haven't found a clean solution. are you planning to test with real GPU allocators like Triton or FasterTransformer? i'd be super curious if their page accounting differs. |
Uh oh!
There was an error while loading. Please reload this page.
Sharing a measurement that may be relevant to RadixAttention and cache
management here.
Under honest paged accounting (a page returns memory only when fully empty),
scattered-token KV eviction of the H2O family frees zero pages across the
entire operational range of memory ceilings I tested (0.60 to 0.25 of FP16
footprint) on Llama-3.2-1B. Real held memory stays at 100%. Eviction on
contiguous 16-token windows, aligned to the default page size, converts
exactly instead.
Results, protocol and limitations: https://athanase-matabaro.github.io/kivu-site/
DOI: https://doi.org/10.5281/zenodo.21527757
Caveats stated up front: accounting simulator rather than a real engine, and
the allocation mechanism is proprietary. I am looking for a partner with GPU
access to validate the page accounting inside an actual serving stack.
All reactions