Model and Inference EngineeringParallelism and placementPrincipal
When can adding tensor-parallel GPUs make decode slower, and how would you choose a better layout?
By Amit Kumar3 min readWorked answer includedReviewed 28 Sept 2026
The question
Interview question
A model fits on four GPUs within one node. Expanding its tensor-parallel group to eight GPUs across two nodes increases per-token latency. Design an experiment that separates local work from collective delay, compare two four-GPU replicas with a cross-node layout, and explain when memory fit or throughput would change the decision.
Draft your approach first
Take a few minutes before you read the answer. Name the constraint that matters most, the failure you are designing for and how you would know it worked.
Reveal the worked answerWorked answer
Tensor parallelism divides a layer’s matrix work among devices. The partial results often need a collective operation, such as an all-reduce that combines contributions across ranks. This saves some local work while adding communication to the layer’s critical path. Decode has little work per sequence at each step, so communication startup can matter even when the link can move large transfers quickly.
Splitting a matrix across twice as many GPUs reduces some local weight work, but the shards have to exchange partial results. In common tensor-parallel Transformer layouts, collectives sit inside the repeated layer computation. Decode produces a small amount of work per token, so even a modest communication startup cost paid across many layers can eat the saved compute time. Moving from four GPUs on one node to eight spread across nodes also changes the link. NVIDIA's NeMo performance guidance recommends keeping tensor parallelism within the fast intra-node interconnect when possible. That is a topology recommendation, not a universal rule that TP across nodes cannot work.
For a hypothetical critical-path budget, suppose 48 layers each add two non-overlapped collective waits of 40 microseconds after the topology change. That adds 3.84 ms per decode step. If sharding saves only 2 ms of local work, the step grows by 1.84 ms under those assumptions. These are illustrative timings, not a device benchmark. A trace must show which communication actually lies on the critical path, because overlapping or fused work cannot simply be summed twice.
I would not decide from GPU utilization or the number eight. Measure per-token time as local matrix work, collective launch and wait, KV reads, sampling, and scheduler gaps. Check the rank placement and the collective algorithm. Is one cross-node rank late, or do all ranks wait on an expensive all-reduce? Trace both prefill and decode because their compute-to-communication ratios differ. A larger batch can give the sharded matrix work enough volume to pay for communication, while an interactive batch of one may not. Keep output length, prompt length, cache state and actual link topology fixed when comparing.
For a model that fits in four GPUs, two independent four-GPU replicas may serve more requests and keep a lower latency than one eight-GPU tensor-parallel replica. That option consumes two copies of the weights and needs enough aggregate memory. If the model does not fit four GPUs, place TP inside each node and consider pipeline parallelism between nodes, accepting stage bubbles and more complex scheduling. Quantization or a different model size may change the fit calculation. NVIDIA's multi-node deployment guide describes this TP-within-node, pipeline-between-nodes layout as a common configuration, not a guarantee of best performance.
Two smaller replicas also change queueing. Requests can be assigned independently, but each replica needs its own model and cache capacity. A single long request cannot use both replicas merely because aggregate throughput is higher. Pipeline stages across nodes can avoid some tensor-parallel exchanges but introduce their own inter-stage transfers and scheduling bubbles. Compare alternatives at the same offered workload, memory safety margin and latency objective. The cited NeMo 25.09 guidance is an archived training-oriented topology recommendation. The serving measurement, rather than that recommendation alone, decides this deployment.
A useful follow-up is whether eight GPUs can ever help. Yes, when memory fit, local bandwidth savings, batch size and interconnect outweigh collective cost. Benchmark tokens per second and first-token and inter-token latency under the intended SLO. The answer may differ between a busy batch fleet and an interactive one.
Related questions
Keep practising model and inference engineering
Follow another question in this area, or search the complete library.
Get my essays on AI engineering and distributed systems by email. Subscribe to ArchCrux