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:
GPU blocks (1, 8)01234567ABBABB
| Request | Its blocks, in order |
|---|---|
| A | 0, 3 |
| B | 1, 2, 4, 5 |
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