LLM Primer VI — Series Introduction & Index
A chapter-by-chapter walkthrough of LLM Primer VI: Scaling AI Systems — the volume that treats LLM inference as an engineering discipline where memory bandwidth, scheduling, and dollar signs collide.
Why this series exists
An H100 rented for four to eight dollars an hour delivers 989 TFLOP/s of BF16 compute. A single user, generating a single response in real time against a 70B model on that chip, consumes roughly 0.34 percent of that compute. The chip is 99.7 percent idle — not because the workload is small, but because the workload is memory-bandwidth-bound and the chip's compute units have nothing to do while HBM streams weights through them. Inference engineering is the discipline of finding work for those idle units. It is a discipline of batching, of KV cache accounting, of quantization, of speculative decoding, of scheduling, and eventually of platform, orchestration, and cost. Every technique in this volume is a variation on the same move: convert bandwidth-bound waste into throughput without breaking the latency the user actually feels.
Who I wrote this for
Platform engineers, SREs, and infrastructure architects who own LLM inference at scale — the people who get paged when latency spikes, whose budget line item is the GPU pool, and who have to explain to finance why last month's bill was double the month before. It is also written for ML engineers who trained the model and now have to serve it, and for backend engineers who suddenly find themselves the closest thing their team has to an inference specialist. The book assumes fluency with distributed systems and containers; it does not assume prior familiarity with GPU internals or the transformer's memory pattern. Those it builds up from first principles.
How to read it
The sixteen chapters divide into six parts. Chapters 1–2 name the workload — the autoregressive loop and the KV cache. Chapters 3–4 walk the silicon that runs it, from H100s to Groq's LPU. Chapters 5–6 walk the model-side compressions — quantization, pruning, distillation — that shrink the bandwidth burden. Chapters 7–9 walk the runtime techniques — batching, paged KV, speculative decoding — that hide idle time. Chapters 10–13 walk the serving stack — engines, platforms, disaggregation, autoscaling — that turns those techniques into a service. Chapters 14–16 walk the money: token economics, self-host versus API, and the cost-cutting moves that compound. The chapters can be read in order or dipped into by topic, but the mechanism-first framing depends on Chapters 1 and 2.
The 16-chapter walk
Between April 23 and May 8 the walkthrough posts one chapter per day. Each article distills the chapter's three key ideas into roughly a five-minute read, with the book chapter supplying the worked examples, code, and In Plain English sidebars.
- April 23 — Chapter 1 — The Mechanics of Token Generation. The autoregressive loop, prefill versus decoding, and why a single user leaves an H100 99.7 percent idle.
- April 24 — Chapter 2 — The KV Cache Challenge. The memory formula, MHA/GQA/MQA trade-offs, and why naive allocation wrecks concurrency.
- April 25 — Chapter 3 — Data Center GPUs for Generative AI. H100, H200, B200, L40S, MI300X — read as bandwidth and VRAM profiles, not FLOPs.
- April 26 — Chapter 4 — Specialized AI Silicon and ASICs. Groq's LPU, Inferentia2, TPU v5p/v6, and Gaudi 3 — where ASICs win and where they lose.
- April 27 — Chapter 5 — Demystifying Quantization. Why FP16 → INT4 quadruples throughput, and what AWQ, GPTQ, SmoothQuant, and GGUF actually do.
- April 28 — Chapter 6 — Pruning and Knowledge Distillation. 2:4 sparsity on Hopper and how a teacher's soft labels become a smaller student model.
- April 29 — Chapter 7 — Advanced Batching Strategies. From static batching to iteration-level continuous batching, and the debt continuous batching creates.
- April 30 — Chapter 8 — Next-Generation KV Cache Management. PagedAttention, H2O eviction, InfiniGen, and the prefix-cache economy.
- May 1 — Chapter 9 — Speculative Decoding. Draft, verify, and the arithmetic of when speculation pays off — EAGLE, Medusa, MTP.
- May 2 — Chapter 10 — The LLM Engine Layer. vLLM, TensorRT-LLM, SGLang, TGI, Ollama, and how to pick an engine on mechanism rather than benchmark.
- May 3 — Chapter 11 — The Platform and Orchestration Layer. Ray Serve, KServe, BentoML, Triton — which platform matches which ops culture.
- May 4 — Chapter 12 — Disaggregated Serving and Kubernetes. Splitting prefill and decode across GPU pools, and the Kubernetes primitives that express it.
- May 5 — Chapter 13 — Autoscaling and Cold-Start Mitigation. Why HPA is wrong for LLMs, and how KEDA, Knative, and CRIU compose sub-5-second cold starts.
- May 6 — Chapter 14 — Token Economics and API Pricing. Why output is priced above input, and how invisible reasoning tokens surprise the invoice.
- May 7 — Chapter 15 — Serverless APIs vs Dedicated Infrastructure. The break-even math, plus the platform-engineering line item most teams underestimate.
- May 8 — Chapter 16 — Cost-Cutting Strategies in Production. Routing, context compaction, batch APIs, and semantic caching — the moves that compound.
About this book and the series
The LLM Primer series is seven volumes written by Sho Shimoda, published on Amazon KDP and read chapter-by-chapter here on the ReceiptRoller blog. The series argues that building with LLMs is a systems discipline, and that the discipline is best learned by walking each layer of the stack in mechanism-first prose rather than checklist form. Volume VI is the infrastructure volume — the one that answers, layer by layer, the question of what has to be true about the hardware, the runtime, and the platform for an LLM feature to survive real traffic and a finance review.