The Model Fits Until the Conversations Grow
Reusing Attention State Consumes Memory
BOTIE
Kwon and colleagues studied this serving problem in their 2023 PagedAttention paper. Requests had different, changing cache sizes, so reserving large contiguous regions could leave memory unused inside or between allocations. Their design borrowed paging ideas from operating systems: manage attention state in smaller blocks and keep a record of which blocks hold each sequence. The vLLM serving system used that arrangement to support more useful work within its memory budget.
Before comparing ways to reserve memory, we need to count the values a conversation actually requires. This lesson calculates the storage for those arrays first. A real server also has bookkeeping overhead and temporary arrays, so its measured memory will exceed this deliberately isolated quantity.