Runbooks/ LLM Inference Runbook Track D · Scale and speed Deep readQuick learn
  1. 00 Start
  2. /
  3. 01 Tokens
  4. 02 Anatomy
  5. 03 Journey
  6. /
  7. 04 Hardware
  8. 05 Phases
  9. 06 KV cache
  10. /
  11. 07 Attention
  12. 08 Position
  13. 09 Precision
  14. 10 Cache ops
  15. /
  16. 11 Many GPUs
  17. 12 Engines
  18. 13 Decode loop
  19. /
  20. 14 Planning
  21. 15 Production
Document 11 · Quick learn Replicate first · Message count, not bytes · MoE saves the wrong thing

Eight GPUsare not one memory

Splitting a model is a workaround for a memory limit, not a performance feature — and mixture of experts saves compute rather than the thing you actually buy.

“Eight chefs, eight separate pantries. Somebody has to decide who stores what.”
5–10%
tensor-parallel overhead — mostly round trips
64 collectives
per token: two a layer, thirty-two layers
652 GiB
a 700B MoE at 8-bit — a node gives 573
0 bytes
MoE saves on memory. None at all
GPU, node, clustereach step down is roughly an order of magnitude
1
Inside one GPUHBM3 · 79.65 GiB of memory that belongs to that card alone
3,350 GB/s
8
Inside one nodeNVLink · eight GPUs that can pass tensors across the bench
900 GB/s
N
Between nodesthe network · still reachable, but by courier
25 GB/s
The analogy — eight chefs with eight separate pantries

They can pass ingredients to each other across the bench very quickly — that is NVLink. What they cannot do is treat the eight pantries as one large pantry: a recipe needing more ingredients than any single pantry holds does not simply work. Somebody has to decide, in advance and explicitly, which chef stores what.

And chefs in the next building can still be handed things, but only by courier — which changes what kinds of recipe are possible at all
Replication first, alwaysthe question that settles most cases

Before any discussion of how to split a model: does it need splitting at all?

Split across all eight

Each GPU holds one eighth of every layer.

  • A collective exchange at every layer, for every token
  • One logical server — any card failing stops everything
  • Collectives, synchronisation, and things to tune
  • Do this because the model does not fit. For no other reason
Does it fit
on one card?

Eight independent copies

Eight servers behind a load balancer.

  • Zero communication between GPUs. Nothing to tune
  • Each GPU runs at the speed it would run at alone
  • One card dies and you lose one eighth of capacity, not the service
  • Adding capacity is adding a replica — a solved problem
Splitting to “go faster” is the classic over-engineering tell

A tensor-parallel group is a single failure domain. If someone proposes it as a latency optimisation for a model that already fits, ask to see the measurement — and point out that they are converting eight independent failure domains into one.

Tensor parallelismthe message count, not the bytes
Slice every layer

Each layer’s weight matrices cut one slice per GPU.

Each GPU computes

Its slice of the result — a partial answer, useless on its own.

All-reduce

Every GPU needs the full sum before the next layer can start.

Over NVLink

~2% of a decode step in bandwidth terms.

Over a network

Comparable to the entire step.

Worked~100 MB per decode step at batch 128 × 4 GPUs = 112 µs of bandwidth, against a 6 ms step — but 64 collectives × 5–10 µs = 0.3–0.6 ms5 to 10% of the step, before you count a single byte
The honest framing

Bandwidth is a few per cent. Message count is the real cost — two collectives per layer, thirty-two layers, sixty-four round trips per token, each carrying a fixed latency regardless of size.

Which means it gets proportionally worse at small batch — exactly where single-request latency actually matters
The KV head constraint, easy to miss

Each GPU holds the cache for the heads it owns. With 8 KV heads and 8-way parallelism, each card gets exactly one — clean, and part of why 8 became conventional. Push the degree above the KV head count and the heads must be replicated.

Sixteen-way on a model with 8 KV heads means every head lives on two cards, so aggregate cache memory doubles rather than staying flat. Beyond that point you want pipeline parallelism, not more tensor parallelism
The other three kindsfour ways to cut, and what each one costs
Tensor

Cuts each layer across GPUs.

Communicates every layer, every token
Needs NVLink — inside one node
Cache: split by head, unless degree > KV heads
Use: a 70B across 2–4 cards
Pipeline

Cuts the stack into groups of layers.

Communicates once per boundary
Tolerates a network
Cache: split by layer — each stage holds its own
Use: frontier models across nodes
Expert

Cuts MoE experts across GPUs.

Communicates routing, per token per layer
Fast links; routing can skew load
Cache: unchanged — attention is untouched
Use: large MoE models
Data / replicas

Cuts nothing — whole copies.

Does not communicate at all
Needs nothing
Cache: each replica has its own, entirely separate
Use: whenever the model fits
The standard shape, and the order of operations

Tensor inside a node, pipeline between nodes, replicate the whole thing.

And the ladder: quantise → replicate if it fits → tensor-parallel within a node → pipeline across nodes. Never skip straight to the last one — fp8 halves the weights and frees far more than adding a card does
Why pipeline parallelism needs several requests in flight

A single request is only ever being worked on by one stage at a time. With one request, the other stages idle — the classic pipeline bubble. You need enough concurrent requests to keep every stage fed.

Which means pipeline parallelism interacts with your batching strategy rather than being independent of it
Mixture of expertssaves operations, not bytes
Many FFNs per layer

Say 128 experts — all resident in GPU memory, all of the time.

A tiny router

One score per expert per token. Picks the top two.

Work per token

Corresponds to two experts — about 30B active.

Memory

Corresponds to all 128 — the full 700B, always.

Worked700B MoE at 8-bit = 652 GiB · eight H100s at 0.90 give 573 GiB — a full node is not enough8×H200 or 16×H100, before a byte of cache
Why routing different tokens to different experts breaks nothing

Worth raising yourself, because it sounds like it should be a problem. Attention is where tokens look at each other; the feed-forward block — the part MoE replaces — processes each token independently even in a dense model.

The rhythm is: mix, refine privately, mix again. MoE only touches the middle step, and the next layer’s attention re-mixes everything regardless. Routing is per token and per layer
The honest summary, and the fair comparison

A 700B MoE with 30B active costs you the memory of a 700B and the speed of a 30B, and produces quality somewhere in between.

The fair comparison is against a dense model of the same active size, where MoE genuinely wins. Against the same total size makes it look bad; against the parameter count makes it look magical. Neither is the comparison that matters
And it does nothing at all for the KV cache

MoE replaces the feed-forward block and leaves attention untouched. MoE and grouped-query attention solve orthogonal problems and are frequently used together in the same model.

Conflating them is one of the most common mistakes in this area
Answer it out loudthe ninety-second version, then five questions
“Eight GPUs are not one big memory — each card’s memory is its own and the software has to be told explicitly how to cut a model up. The first question is whether it needs cutting at all: if the model fits on one card, run independent replicas, because that costs zero communication and any card can fail without taking the service down. If it does not fit, tensor parallelism slices each layer across cards with an all-reduce at every layer — which NVLink can carry at a few per cent overhead and a network cannot, and which is really limited by message count rather than bytes: sixty-four collectives a token at five to ten microseconds each. And mixture of experts saves operations, not memory — every expert stays resident, so a 700B MoE needs 700B of memory.”

Five questions, and the spine of each answer

Architect

When would you split a model across GPUs?

  • When it does not fit on one. That is the only reason — say it that plainly
  • Splitting adds a collective at every layer for every token
  • Bandwidth is a few per cent over NVLink; 64 collectives per token makes the real overhead 5–10%
  • Over a network it is comparable to the entire step
The ladder: quantise first (fp8 frees more than adding a card), then split as little as you can. And if it already fits, replicate — zero communication, and one card failing costs an eighth of capacity rather than everything.
Architect

Does tensor parallelism make a single request faster?

  • Sometimes a little — more total bandwidth working on the same weights
  • But the collectives eat into it, and at small batch the fixed per-message latency dominates
  • Which is exactly where single-request latency matters
Honest framing: you do it for capacity, not speed. If someone proposes it as a latency optimisation for a model that fits, ask for the measurement — and note they are converting eight failure domains into one.
Architect

Does the KV cache get split too?

  • Yes, by head. Each GPU holds the cache for the attention heads it owns
  • 8 KV heads and 8-way parallelism → one per card. Clean, nothing duplicated
  • Part of why 8 KV heads became conventional
The trap is going further: if the degree exceeds the KV head count, heads are replicated and the aggregate cache doubles. Beyond that, use pipeline parallelism between nodes rather than more tensor parallelism within them.
Eng manager

A 700B MoE is described as running like a 30B. What do we buy?

  • The memory of a 700B and the compute of a 30B — and memory is what you buy hardware for
  • All experts stay resident; the router’s next choice cannot be predicted
  • At 8-bit that is 652 GiB. A full H100 node at 0.90 gives 573 — not enough
  • 8×H200, or 16×H100 across two nodes — before any cache
Two follow-ons: it does nothing for the cache, so all per-user arithmetic is unchanged; and the fair quality comparison is against a dense model of the same active size. If the business case was built on “as cheap as a 30B”, correct it before the purchase order.
Architect

How would you lay out a model that does not fit on one node?

  • Tensor parallelism inside each node — capped at the KV head count, never crossing the node boundary
  • Pipeline parallelism between nodes — one handover per boundary, which a network can carry
  • Then replicate the whole arrangement for capacity and failure isolation
And keep enough requests in flight to fill the pipeline, or the stages idle. Quantise before any of it — halving the weights often removes the need for the second node entirely.
Fast answersthe ten that come up most

QWhy can I not just add GPUs and get more memory?

Each GPU’s memory belongs to that GPU; there is no automatic pooling. An 8-GPU node with 80 GB each is not a 640 GB device. NVLink lets one card read another’s memory quickly, which is what makes splitting workable — but the software has to be told how to cut the model up.

QWhat is a sensible tensor-parallel degree?

The smallest one that fits, capped at the KV head count, never crossing a node boundary. For a 70B in bf16 on H100s that is 2 at a squeeze or 4 comfortably; at fp8 it fits on one. Always try quantisation first.

QDoes MoE help my KV cache?

Not at all. MoE replaces the feed-forward block; attention and the KV cache are untouched. MoE and grouped-query attention solve completely different problems and are often used together. Conflating them is one of the most common mistakes here.

QCan I fine-tune a MoE model to add a new specialism?

Fine-tuning nudges the existing routing but will not reorganise which expert handles what — the structure was established during pre-training. Adding genuinely new specialisation means training, not fine-tuning.

QWhy does pipeline parallelism need several requests in flight?

A single request is only ever being worked on by one stage at a time — the classic pipeline bubble. You need enough concurrent requests to keep every stage fed, which means it interacts with your batching strategy.

QWhat is expert parallelism?

Spreading a MoE model’s experts across GPUs so each card holds a subset. It composes with tensor and pipeline parallelism rather than replacing them. Its specific difficulty is load skew: routing is data-dependent, so some cards end up busier, which shows up as a tail-latency problem.

QWhat about TPUs and other accelerators?

Different hardware, same principles. Memory per chip, a fast interconnect within a group, a slower one between groups. Everything here transfers — only the constants change.

QDoes splitting change the model’s output?

It should not, and in principle does not. In practice floating-point addition is not associative, so a different reduction order can produce very slightly different numbers, and with sampling that can occasionally change a token. Worth knowing before you promise bit-identical output.

QWhy is 8 GPUs the standard node size?

It is what the reference server designs ship, and it maps onto power, cooling and NVLink topology. The consequence: 8 is the natural ceiling for tensor parallelism — and it is not a coincidence that 8 KV heads became conventional at the same time.

QOne sentence for the whole document?

Parallelism exists because the model does not fit; if it fits on one card, replicate instead; and mixture of experts saves compute rather than memory, so it changes what you buy far less than the parameter count suggests.

Splitting a model is a workaround for a memory limit, not a performance feature. If it fits on one card, replicate — zero communication, and one card failing costs an eighth of capacity rather than the service. If it does not, quantise before you split, split as little as you can, and stop at the KV head count. And mixture of experts saves the thing you do not buy — a 700B MoE needs 652 GiB whether two experts run or all hundred and twenty-eight do.

Where this goes next

Questions to ask them

What tensor-parallel degree are you running, and why that number?

Does the model actually need splitting, or does it fit at your precision?

Is the parallel degree above or below the KV head count?

Do any parallel groups cross a node boundary?

If you serve a MoE model, was the hardware sized on total parameters or active ones?

How many replicas, and what happens when one card in a tensor-parallel group fails?

← 10 · Cache ops Read the full chapter → 12 · Engines →