Inference Trade-offs Explained

Chapter 05

Heterogeneous pools

Different hardware for prefill and decode: H100 and A100 pools, each phase on the part that suits it. Below, the mechanism as the simulator ran it, step by step; then what it measured, why it behaves that way, and the papers.

Check yourself ↓ three questions and what to remember, at the end

Loading the pool animation…

What the simulator recorded

The sweep does not vary pool hardware; these are the simulator's recorded runs (results.md section 10), in the matrix's colours against the all-H100 pools.

PoolsTTFT p99TPOT p99Goodput (req/s)J / tokentok/s per $1000
H100 prefill + H100 decode (--device h100)353.6 ms 8.8 ms 7.69 0.326 2,850
H100 prefill + A100 decode353.6 ms 16.8 ms 7.69 0.299 2,714
A100 prefill + H100 decode47.1 s 7.7 ms 0.00 0.448 1,952
A100 prefill + A100 decode47.1 s 13.8 ms 0.00 0.401 1,894
2x A100 prefill + H100 decode1,079.7 ms 8.8 ms 7.58 0.412 1,861
Heterogeneous pools, Llama-3-8B shape, eight requests per second. Silicon dollars are illustrative (die area and yield, not prices).

Put each phase on the device that suits it

Once prefill and decode run on separate pools, they need not run on the same hardware (Splitwise). Decode is memory-bound, so an older or cheaper part with good bandwidth may do; prefill is compute-bound, so it wants FLOPs. In the animation an A100 decode pool behind an H100 prefill pool raises TPOT p99 from 6.8 ms to 10.8 ms, still inside the TPOT SLO, while an A100 prefill pool cannot keep up with the prompts: TTFT p99 goes from 204.6 ms to 1,044 ms.

The remedy for a slow prefill device is more of it: two A100 prefill instances in front of the same H100 decode bring TTFT p99 back to 417.8 ms. The prefill pool has to match the prompt rate in FLOPs, whatever part supplies them.

Why each pool wants a different part

Prefill is bound by compute and decode by memory bandwidth, so a part that is short of FLOPs but not of bandwidth costs little in the decode pool and a great deal in the prefill pool. At the recorded load the A100 decode pool still meets every SLO, at 0.299 joules per token against 0.326 for all-H100 pools, while the single A100 prefill pool serves 0.00 requests per second inside the SLOs. Two A100 prefill instances recover the goodput (7.58 req/s) but buy it with more silicon and energy: per $1000 of illustrative silicon they serve 1,861 tokens per second, against 2,850 for the H100 pair. Whether a mixed fleet pays depends on what the older parts cost, which the simulator does not price.

Hardware choice inside one pool is chapter 12; where the FLOPs and bytes of each device come from, the roofline and other ways to build a matrix engine.

Check yourself

Commit to an answer before you reveal it: a wrong guess you can explain teaches more than a right one you skimmed. Every number in the answers comes from the same tested model as the chapter’s.

Q1Put an A100 decode pool behind an H100 prefill pool. What happens to TPOT p99?
Reveal the answer

Answer: It rises but stays inside the TPOT SLO

From 6.8 ms to 10.8 ms: decode is memory-bound, so an older part with good bandwidth can do.

Each phase on the device that suits it →

Pick one, then reveal.

Q2And an A100 prefill pool in front of an H100 decode pool?
Reveal the answer

Answer: It cannot keep up with the prompts: TTFT p99 grows far beyond the SLO

Prefill is compute-bound and wants FLOPs: TTFT p99 goes from 204.6 ms to 1,044 ms.

Each phase on the device that suits it →

Pick one, then reveal.

Q3The A100 prefill pool cannot keep up. What brings TTFT back?
Reveal the answer

Answer: A second A100 prefill instance: the pool must match the prompt rate in FLOPs

Two A100 prefill instances bring TTFT p99 back to 417.8 ms, at the cost of more silicon and energy per token.

Each phase on the device that suits it →

Pick one, then reveal.

Papers and sources