Why Llama-70B with 1M tokens doesn't fit on a single GPU. The three bottlenecks: weights, activations, and attention.
From GPU memory constraints to production serving
How do you run Llama-70B with a 1 million token context window on A100 GPUs? The model weights need 140 GB, the KV cache needs 328 GB, and the naive attention matrix would require 128 TB. This series walks through every technique needed to make it work — with step-by-step calculations and animations at every stage.
Phase 1 (Parallelism): "Why doesn't it fit?" → "How to distribute it"
Phase 2 (Quantization): "How to compress it" → "Even more headroom"
Phase 3 (Production): "How to actually serve it" → "Working code"
If you find this series useful in your work or writing, feel free to cite it:
@misc{fofadiya2026llminference,
author = {Darshan Fofadiya},
title = {The Illustrated Guide to LLM Inference at Scale},
year = {2026},
url = {https://darshanfofadiya.com/llm-inference/},
note = {Accessed: 2026}
}
Or in plain text:
Darshan Fofadiya, "The Illustrated Guide to LLM Inference at Scale," 2026. https://darshanfofadiya.com/llm-inference/