Multi-GPU computing splits one workload across two or more GPUs, either by giving each a model copy (data parallelism) or by splitting the model itself (tensor, pipeline or expert parallelism). You need it when a model and its working memory exceed one card, or one card is too slow. Otherwise one bigger GPU is simpler.
- Common machine sizes
- 2, 4 or 8 GPUs of the same model
- PCIe Gen4 / Gen5 x16
- ~32 / ~64 GB/s each direction
- NVLink, A100 SXM
- 600 GB/s per GPU
- NVLink, H100 SXM
- 900 GB/s per GPU
- Parallelism types
- Data, FSDP/ZeRO, tensor, pipeline, expert
- Check GPU links
- nvidia-smi topo -m
- Scaling efficiency
- Rarely linear; 70–95% per added GPU is typical in one machine
Most AI work runs on one GPU. Then a model gets bigger than the card, a fine-tune takes days, or traffic outgrows a single server, and the question becomes whether to add more GPUs or switch to a bigger one. Multi-GPU computing solves real problems, but it also adds communication overhead, new failure modes and cost.
This guide explains how work is split across GPUs, why the links between them matter, and how to decide whether you need several cards at all. It is part of our series on GPU cloud computing.
What is multi-GPU computing?
Multi-GPU computing is running one workload across two or more GPUs at the same time, with software coordinating how data and model are divided and how results are combined. The GPUs can be in one machine (typically 2, 4 or 8) or across many machines joined by a fast network.
It is different from simply having several GPUs. Four users each running their own notebook on their own card is four single-GPU jobs. Multi-GPU computing means the cards cooperate on one job: one model served faster, one training run finished sooner, or one model too big for any single card made to fit.
When do you need more than one GPU?
You need more than one GPU for one of three reasons: the job does not fit in one card's memory, one card cannot serve your traffic, or one card would take too long. If none applies, stay on one GPU.
| Reason | Example | Multi-GPU approach | Single-GPU alternative to check first |
|---|---|---|---|
| Memory | Llama 3.3 70B in BF16 needs ~140 GB of weights | Tensor parallel across 2–4 × 80 GB | FP8 on one 80 GB card, or a 180 GB B200 |
| Memory | Full fine-tune of an 8B model needs ~128–160 GB | FSDP or ZeRO sharding across 2–8 GPUs | LoRA on one 24–48 GB card |
| Throughput | One 8B model serving hundreds of users | Several copies, one per GPU (data parallel) | Bigger batch on one faster card |
| Time | Training run would take a week on one card | Data parallel across 4–8 GPUs | Accept the wait if not urgent |
The memory case is the most common. Do the VRAM sum first: weights (parameters × bytes per parameter) plus KV cache plus 10–20% headroom. Our guide to what GPU VRAM is and why it matters has the formulas. If the total fits on a single larger card you can rent, that is almost always the better option.
How is work split across multiple GPUs?
Work is split across GPUs in five main ways: copy the model and split the data, shard the model's training state, split each layer, split the stack of layers, or spread a mixture-of-experts model's experts. Each communicates differently and needs different interconnect speed.
| Strategy | What is split | Communication | Interconnect needs | Typical use |
|---|---|---|---|---|
| Data parallel (DDP) | Data; each GPU has a full model copy | Gradients averaged once per step | Moderate | Training models that fit on one GPU |
| Sharded data parallel (FSDP, ZeRO) | Weights, gradients and optimiser state | Gathers and scatters every layer | Moderate to high | Training models too big for one GPU |
| Tensor parallel | Each layer's matrices | All-reduce in every layer, every token | High (NVLink ideal) | Serving or training big models |
| Pipeline parallel | Groups of layers per GPU | Activations passed between stages | Low to moderate | Very deep models, multi-node |
| Expert parallel | MoE experts across GPUs | Tokens routed to experts' GPUs | Moderate to high | Large mixture-of-experts models |
| Independent replicas | Nothing; separate copies serve separate requests | None | None | Inference throughput |
For inference, the two you will use are independent replicas (simplest, perfectly scalable) and tensor parallelism (when one model needs more than one card). For training, DDP and FSDP cover most needs. What is distributed training and how does it work goes deeper on the training side.
How do GPUs in one machine talk to each other?
GPUs in one machine communicate either over PCIe, through the motherboard and sometimes the CPU, or over NVLink, a direct GPU-to-GPU connection on SXM servers and some bridged PCIe cards. NVLink is roughly ten times faster.
| Link | Bandwidth per GPU (published) | Found on |
|---|---|---|
| PCIe Gen4 x16 | ~32 GB/s each direction | A100 PCIe, L40S, RTX 4090 servers |
| PCIe Gen5 x16 | ~64 GB/s each direction | H100 PCIe, RTX PRO 6000, H200 NVL servers |
| NVLink (A100 SXM) | 600 GB/s | HGX A100 |
| NVLink (H100/H200 SXM) | 900 GB/s | HGX H100, HGX H200 |
| NVLink bridge (H100 NVL, H200 NVL) | Pairs or groups of cards bridged | Some PCIe servers |
| InfiniBand / RoCE between machines | 200–400 Gbit/s per link (25–50 GB/s) | Training clusters |
The RTX 4090 has no NVLink at all, so multi-4090 setups always use PCIe. You can see how your GPUs are connected with:
nvidia-smi topo -mThe matrix uses codes such as NV# (connected by NVLink, # links), PIX (one PCIe switch), PXB (several PCIe switches), PHB (through the CPU's PCIe host bridge), NODE and SYS (across CPU sockets, slowest). Libraries such as NCCL pick the fastest path automatically, but they cannot make PCIe as fast as NVLink.
How much does the interconnect matter? A worked estimate
The interconnect matters most for tensor parallelism, because every layer ends in an all-reduce across GPUs. A rough calculation shows why it hurts more for long prompts than for chat replies.
Take Llama 3.3 70B split across 2 GPUs with tensor parallelism. Its hidden size is 8,192, and each of its 80 layers does two all-reduces. In BF16, each all-reduce moves about 8,192 × 2 bytes = 16 KB per token.
traffic per token ≈ 80 layers × 2 all-reduces × 16 KB ≈ 2.6 MB
prefill of a 4,000-token prompt ≈ 4,000 × 2.6 MB ≈ 10.5 GBAt an effective ~25 GB/s over PCIe, moving 10.5 GB takes roughly 0.4 seconds. Over NVLink at hundreds of GB/s it takes a few hundredths of a second. During decode, each token moves only ~2.6 MB, but 160 small synchronisations per token add latency on PCIe. These are rough estimates that ignore overlap of communication with compute, which good kernels exploit. The lesson stands: tensor parallelism over PCIe works, but you pay for it, especially on long prompts.
How do you run inference across multiple GPUs?
Run inference across multiple GPUs either by splitting one model with tensor parallelism, when it does not fit on one card, or by running one independent copy per GPU, when it does and you need more throughput.
Tensor parallelism with vLLM, assuming a recent release and two 80 GB GPUs:
vllm serve meta-llama/Llama-3.3-70B-Instruct --tensor-parallel-size 2 \
--max-model-len 8192 --gpu-memory-utilization 0.95The BF16 weights are about 140 GB, so each card holds roughly 70 GB and has only a few GB left for KV cache. That is why the example caps the context at 8,192 tokens. With FP8 weights instead, each card holds about 35 GB and has far more room for long contexts and many users; four cards give more room again.
Independent replicas, one per GPU, behind any load balancer:
CUDA_VISIBLE_DEVICES=0 vllm serve Qwen/Qwen3-8B --port 8000 &
CUDA_VISIBLE_DEVICES=1 vllm serve Qwen/Qwen3-8B --port 8001 &Replicas scale almost perfectly, because the GPUs never talk to each other. When a model fits on one card, replicas are nearly always better than tensor parallelism for throughput. Recent vLLM versions also offer a built-in data-parallel mode that does the same inside one server.
How do you train across multiple GPUs?
Train across multiple GPUs in PyTorch by launching one process per GPU with torchrun and wrapping the model in DistributedDataParallel, or in FSDP if the model and optimiser state do not fit on one card.
A minimal DDP skeleton:
import os, torch, torch.distributed as dist
from torch.nn.parallel import DistributedDataParallel as DDP
dist.init_process_group("nccl")
local_rank = int(os.environ["LOCAL_RANK"])
torch.cuda.set_device(local_rank)
model = MyModel().cuda(local_rank)
model = DDP(model, device_ids=[local_rank])
# use a DistributedSampler so each GPU sees a different shard of the dataLaunch it on a four-GPU machine:
torchrun --nproc_per_node=4 train.pyThe PyTorch distributed documentation covers FSDP and the launcher. Hugging Face Accelerate, DeepSpeed and Axolotl wrap these with configuration files. A practical setup walk-through is in how to set up a multi-GPU machine learning environment, and the trade-offs are in single GPU vs multi-GPU training.
Does adding GPUs make jobs proportionally faster?
No. Adding GPUs gives less than proportional speed-up because of communication, synchronisation and parts of the job that do not parallelise. Within one machine, data-parallel training often reaches 70–95% efficiency per added GPU; tensor parallelism over PCIe is usually lower. Treat these as rules of thumb and measure your own.
Efficiency turns directly into cost. Suppose a job takes 10 hours on one GPU.
| GPUs | Scaling efficiency (assumed) | Wall-clock time | GPU-hours billed | Extra cost vs 1 GPU |
|---|---|---|---|---|
| 1 | 100% | 10 h | 10 | – |
| 2 | 90% | 10 ÷ (2 × 0.9) ≈ 5.6 h | 11.1 | +11% |
| 4 | 85% | 10 ÷ (4 × 0.85) ≈ 2.9 h | 11.8 | +18% |
| 8 | 75% | 10 ÷ (8 × 0.75) ≈ 1.7 h | 13.3 | +33% |
Going to eight GPUs gets the result six times sooner for a third more money. Whether that is worth it depends on what your time is worth. If nobody is waiting, one GPU running overnight is cheapest.
Is one big GPU better than several small ones?
When the workload fits, one big GPU is usually better than several small ones: no communication overhead, no duplicated memory, simpler software and fewer things to go wrong. Several GPUs win when no single card is large enough, or when you want independent replicas for throughput.
| Need | Several smaller GPUs | One bigger GPU | Usually better |
|---|---|---|---|
| ~96 GB for a 70B model with long context | 2 × L40S (96 GB total, PCIe, 864 GB/s each) | 1 × RTX PRO 6000 (96 GB, 1.8 TB/s) | One bigger |
| ~160 GB for 70B BF16 | 2 × H100 80GB | 1 × B200 (180 GB, 8 TB/s) | One bigger, if affordable |
| ~280 GB for Qwen3 235B-A22B FP8 | 4 × 80 GB | 1 × B300 (288 GB) | One bigger |
| Serve an 8B model to many users | 4 × RTX 4090 replicas | 1 × H100 | Depends; replicas scale well |
| Full fine-tune of 8B | 4–8 × 80 GB with FSDP | 1 × B200 180 GB, tight | Multi-GPU for headroom |
For more on how providers package multi-GPU machines, see our comparison of cloud providers for multi-GPU servers.
When do you need multiple machines?
You need multiple machines when one job needs more GPUs than fit in one server, usually more than eight. That is the world of pre-training and very large fine-tunes, and it requires a high-speed network such as InfiniBand between servers, plus a scheduler such as Slurm or Kubernetes.
Most teams running inference, LoRA fine-tunes or experiments never need it. If you do, look at the large specialist clouds and hyperscalers that sell clusters with InfiniBand and NVLink-connected SXM nodes.
Does Wandering Giants Compute rent multi-GPU machines?
Yes. On Wandering Giants Compute you can rent 1, 2, 4 or 8 of the same GPU in one machine, with root access to set up DDP, FSDP or tensor-parallel vLLM yourself. Run nvidia-smi topo -m after launch to see how the cards are linked; our H100 is the PCIe card, so plan for PCIe-speed links between GPUs unless the topology shows otherwise. We don't offer multi-node clusters or InfiniBand; for jobs that need more than eight GPUs, a large GPU cloud is the right choice.
| Machine | Total memory | Price per hour | Example job |
|---|---|---|---|
| 2 × L40S | 2 × 48 GB | 2 × $1.89/hr ≈ $3.78 | Two replicas of Qwen3 32B AWQ |
| 2 × H100 PCIe | 2 × 80 GB | 2 × $4.99/hr ≈ $9.98 | Llama 3.3 70B in BF16, tensor parallel |
| 4 × A100 80GB | 4 × 80 GB | 4 × $3.79/hr ≈ $15.16 | FSDP full fine-tune of an 8B model |
| 1 × B300 | 288 GB | $18.09/hr | Qwen3 235B-A22B FP8 with no splitting |
Before stacking cards, check the single-GPU option: a 96 GB RTX PRO 6000 at $4.89/hr, a 141 GB H200 at $9.09/hr or a 180 GB B200 at $15.49/hr may fit your model on one card. Billing is by the minute from prepaid credit, and the machine stops itself if credit runs out. See the GPUs and prices.
Frequently asked questions
Do two 24 GB GPUs equal one 48 GB GPU?
Not quite. Splitting a model across two cards gives you about 48 GB in total, but each GPU must exchange data with the other on every layer or stage, which adds latency, and some memory is duplicated. One 48 GB card running the same model is usually faster and simpler.
Do I need NVLink for multiple GPUs?
Not for data parallelism or for running separate copies of a model; PCIe is fine. NVLink matters for tensor parallelism and large-scale training, where GPUs exchange data on every layer. Across PCIe, tensor parallelism over two or four cards still works but scales less well.
How do I run an LLM across several GPUs?
With vLLM, add --tensor-parallel-size equal to the number of GPUs, for example vllm serve meta-llama/Llama-3.3-70B-Instruct --tensor-parallel-size 2. vLLM splits each layer across the cards and handles communication with NCCL.
How do I train on multiple GPUs in PyTorch?
Wrap your model in DistributedDataParallel (or FSDP for models too large for one card) and launch one process per GPU with torchrun --nproc_per_node=N train.py. Hugging Face Accelerate and DeepSpeed wrap the same mechanisms with less code.
Does using 4 GPUs make training 4 times faster?
Rarely exactly. Communication, data loading and synchronisation take some time, so scaling efficiency is usually below 100%. Data-parallel training on fast links can come close; tensor-parallel jobs over PCIe lose more. Measure throughput at 1 and N GPUs to know.
When should I use multiple machines instead of one multi-GPU machine?
Only when you need more than about eight GPUs for one job, which usually means pre-training or full fine-tuning of very large models. Multi-node training needs high-speed networking such as InfiniBand and is offered by large GPU clouds and hyperscalers.
Rent the GPU for this, by the minute.
Launch a machine with 2, 4 or 8 identical GPUs when one card isn't enough, billed by the minute and stopped when you're done.
Prepaid credit, billed by the minute, stops itself when credit runs out. Prices in £, $, €, ¥, CA$, A$, CHF and S$; UK prices include VAT.
Keep reading
- Complete guideWhat Is GPU Cloud Computing? The Complete Guide
- GuideSingle GPU vs Multi-GPU Training: What Changes?
- GuideWhat Is Distributed Training and How Does It Work?
- TutorialHow to Set Up a Multi-GPU Machine Learning Environment
- ComparisonBest Cloud Providers for Multi-GPU Servers
- GuideWhat Is GPU VRAM and Why Does It Matter for AI?
About this article. Written by the Wandering Giants Compute team, the people who run Wandering Giants Compute. Hardware figures are the manufacturers’ published specifications. Speeds and costs marked as estimates are worked out from those specifications and our current prices, with the method shown; they are not measured benchmarks. Wandering Giants prices are taken live from our price list each time this page is built.
Last reviewed 25 November 2026.