Inference Trade-offs Explained

/learn

The levers

One chapter per lever. Each opens with its mechanism, animated from states the simulator recorded, then its row of the matrix (or, for the levers the sweep does not vary, the simulator's recorded results in the same colours), then why it behaves as measured, with links to the family's Kernels, Numerics and Systolic visuals, and its papers. How each mechanism works is explained step by step on LLM Inference Explained; the chapters here are about the trade-off. For one workload at a time, see the case studies.

  1. Which requests share a forward pass: prompts first, running decodes first, or prompts cut into chunks that ride along with the decodes.

  2. Reserving each request's whole KV cache up front, or handing out blocks as it grows and evicting a request when they run out.

  3. Keeping the KV of shared prompt prefixes so the next request with the same prefix skips their prefill.

  4. Running prefill and decode on separate GPU pools, handing each request's KV cache across a link.

  5. Different hardware for prefill and decode: H100 and A100 pools, each phase on the part that suits it.

  6. What the link between the pools costs, and compressing the KV cache on the prefill GPU before it crosses.

  7. A causal encoder–decoder split that changes what the prefill pool has to compute.

  8. Splitting one model across GPUs: slicing every layer's matrices, cutting the layers into pipeline stages, or spreading a mixture of experts, and what each costs in communication, memory and idle time.

  9. Fewer bytes per weight and per KV value, and faster matmuls where the hardware has units for the format.

  10. A cheap draft proposes several tokens and the target model checks them in one pass.

  11. Where the joules per token go, and what power caps and clock scaling trade.

  12. H100, H200 or B200: what each buys on each workload, per GPU and per dollar.

  13. The levers together, as modern serving engines run them, against each one alone.