Scaling Across GPUs

At some point a model doesn't fit on one GPU, or the traffic doesn't, and you have to spread inference across many. The choices — which kind of parallelism, how to place replicas, when to autoscale — are governed by one unforgiving resource (GPU memory) and one expensive one (inter-GPU communication). Get the memory math right and most scaling decisions follow.

The serving-engine post got a model running fast on a GPU. This one asks what happens when one GPU isn’t enough — because the model is too big to fit, or the request volume is too high to serve. Scaling LLM inference across GPUs is its own discipline, dominated by GPU memory limits and the cost of moving data between GPUs. This post covers the memory math, the kinds of parallelism, and how to scale for traffic.

Start with the memory math

Every scaling decision begins with GPU memory, because it’s the hard limit. Three things consume it, and you must budget all three:

The first question is always: does the model fit on one GPU with enough room left for a useful KV cache? If yes, you scale by replication (more copies). If no, you must split the model across GPUs with model parallelism. These are fundamentally different, and conflating them is a common mistake.

Scaling for capacity: replication

If the model fits on one GPU, scaling for more traffic is the easy case: run multiple independent replicas, each a full copy of the model on its own GPU (or group), behind a load balancer that distributes requests across them.

                    ┌─ GPU 1: full model  ← requests
   load balancer ───┼─ GPU 2: full model  ← requests
                    └─ GPU 3: full model  ← requests
   (each replica serves independently; add replicas for more throughput)

Replication scales throughput nearly linearly (double the replicas, roughly double the capacity) and improves availability (one replica failing doesn’t take you down). It needs no inter-GPU communication within a request, so it’s simple and efficient. This is the default way to handle traffic growth when the model fits — and because each replica runs its own continuous-batching serving engine, you’re really scaling “how many batching engines” you run. Prefer replication whenever the model fits; it’s the cheapest, most robust axis.

Scaling for size: model parallelism

When the model is too big for one GPU, you must split the model itself across GPUs. This introduces inter-GPU communication into every forward pass, which is the cost you’re managing. The main kinds:

These are often combined (tensor parallelism within a machine, pipeline parallelism across machines) to run very large models. The key trade-off to internalize: model parallelism buys you the ability to run a bigger model at the cost of inter-GPU communication overhead, and that overhead grows with how “tightly” you split (tensor > pipeline). You split only as much as you must to fit the model, because every split adds communication latency.

Data parallelism vs. model parallelism

It’s worth stating the distinction crisply because the terms get muddled:

The typical production topology combines them: split the model across a small group of GPUs just enough to fit it (model parallelism), then run many such groups as replicas behind a load balancer (data parallelism). Fit first, then replicate.

Scaling for traffic: autoscaling

Real traffic is spiky, and GPUs are expensive, so you don’t run peak capacity 24/7 — you autoscale the number of replicas to demand. But LLM serving makes autoscaling harder than a typical web service:

The practical pattern: keep enough warm replicas to meet baseline latency SLOs, scale out proactively on queue-depth/latency signals with headroom for cold-start lag, and use the cheaper axes first (quantize to fit on fewer GPUs, batch to fill each replica) before adding hardware.

Bringing scaling together

Scaling is where inference meets infrastructure economics. The final post pulls the whole series together into the numbers that matter — latency, throughput, and cost — and how to tune the balance.

Key takeaways

Further reading

Sources & References

Tensor and pipeline parallelism