Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
PagedAttention stores the KV cache in fixed-size blocks tracked by a block table, killing the fragmentation that contiguous reservation wastes, so more requests fit and batch size rises.
Imagine a parking lot where every car must park in one long unbroken strip of spaces, and you reserve the strip based on the longest trip anyone might take. Most drivers leave early, so huge stretches sit empty but blocked. The lot looks full while half of it is wasted. PagedAttention instead breaks the lot into small numbered bays and hands out one bay at a time, only as each car actually needs it. A little map records which bays belong to which car, so they can be scattered anywhere. Nothing is reserved that is not used, the empty gaps vanish, and far more cars fit at once. Fitting more cars at once is exactly what raises a serving system's throughput.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
3 min: fragmentation in contiguous KV reservation, block table and paged allocation, why freed memory raises batch size, and how decode bandwidth amortization turns that into throughput.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Saying PagedAttention speeds up the attention math or compresses the KV cache. It changes only the memory layout; the arithmetic per token is unchanged.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.