R300How the memory for a million tokens shrank 150,000 timesA teaching piece built on one running number: the GPU memory needed to hold a million tokens of context, excluding model weights, across seven architectural steps. It starts at 130.5 TB for a 2023-era 65B model with standard attention — 128 TB of attention scores plus 2.5 TB of KV cache, about 1,700 top-end GPUs — and ends at 890 MB. The steps are worth knowing separately, because only the first is free. Not materialising the score table drops it to 2.5 TB with identical output. Grouped-query attention, sharing keys and values across head groups, reaches 320 GB. Multi-head latent attention, caching a 512-number latent plus 64 position numbers per token, reaches 68.6 GB and fits one GPU. An 8-bit cache plus a sparse attention indexer gives 46.9 GB, the indexer adding about 8 GB back. Merging every 4 or every 128 tokens into one entry on alternate layers gives 3.4 GB. Cross-layer sharing with a 4-bit cache, 40 layers reading 4 caches, gives 890 MB. The headline 150,000x is the full chain; the cache alone shrank about 2,900x. Everything from the latent-attention step on is lossy and trained into the model, so the KV layout is tied to the model and its serving kernels, and old context is held less precisely than new. Two consequences for practice: check that your serving stack has kernels for the model's cache format, and do not assume a model recalls exact text from deep in a long context as well as it recalls recent text.kv-cacheattentioninferencelong-contextteaching