23/26
Part 4 of 4 · Prefill, decode and memoryLearn and do

Paged attention keeps the cache in small blocks

One buffer per request, reserved at the longest it might get, leaves most of it empty: request A uses 6 of its 24 slots, and request B 13. Paged memory hands out blocks of 4 slots as each request grows, wherever they are free:

Paged blocks on one GPU
GPU blocks (1, 8)
01234567ABBABB
RequestIts blocks, in order
A0, 3
B1, 2, 4, 5
Predict

With one buffer per request, A uses 6 of its 24 slots and B 13 of 24. What share of the reserved memory holds tokens?

Pick an answer above to see the rest