Short answer
A multi-GPU LLM setup lets you combine the VRAM of several graphics cards to run models too large for one GPU. Two 24 GB cards (for example 2 × RTX 3090) give 48 GB, enough for a 70B model at 4-bit. Tools split the model in two main ways: layer splitting (pipeline style), used by default in llama.cpp and Ollama, which is simple and works with mixed GPUs; and tensor parallelism, used by vLLM, which splits each layer across GPUs for higher speed but needs matched GPUs and benefits from fast interconnects. RTX 40 and 50 series cards have no NVLink, so GPUs communicate over PCIe. Plan for power (a 1,200–1,600 W PSU for two high-end cards), physical space and cooling.
Why use multiple GPUs?
- More memory: the main reason. VRAM adds up across cards for holding model weights and KV cache.
- More speed: with tensor parallelism, multiple GPUs can generate tokens faster than one.
- More users: serve several people at once.
Multiple GPUs do not combine into one big GPU automatically; software must split the model.
How models are split across GPUs
| Method | How it works | Speed | Requirements | Used by |
|---|---|---|---|---|
| Layer split (pipeline style) | GPU 1 holds the first layers, GPU 2 the rest; data passes between them once per token | Roughly the speed of one GPU (GPUs take turns) | Works with mixed GPUs; low interconnect needs | llama.cpp, Ollama, LM Studio, ExLlama |
| Tensor parallelism | Every layer is split across all GPUs, which work simultaneously | Faster, scales with GPU count | Matching GPUs, ideally 2/4/8; more interconnect traffic | vLLM, SGLang, TensorRT-LLM |
| Row split (llama.cpp) | Splits matrices by rows across GPUs | Sometimes faster on fast interconnects | Similar GPUs | llama.cpp --split-mode row |
| Expert offload (MoE) | Some experts on CPU RAM, rest on GPU | Depends on RAM bandwidth | Lots of system RAM | llama.cpp tensor overrides |
For background, see parallelism in distributed training and NVLink explained.
Popular multi-GPU builds
| Build | Total VRAM | What it runs (4-bit) | Notes |
|---|---|---|---|
| 2 × RTX 3090 | 48 GB | 70B dense models; ~100B MoE with offload | Best value; used cards; NVLink bridge supported |
| 2 × RTX 4090 | 48 GB | 70B dense | Faster compute; no NVLink; large cards |
| 2 × RTX 5090 | 64 GB | 70B with long context; larger MoE | 575 W each; serious PSU required |
| 4 × RTX 3090 | 96 GB | ~120B-class MoE, 70B at higher precision | Needs workstation/server platform and risers |
| RTX 5090 + RTX 3090 | 56 GB | 70B dense with layer split | Mixed cards work in llama.cpp |
| 2 × RTX PRO 6000 Blackwell | 192 GB | Very large MoE models | Workstation budget |
Use our VRAM calculator to check fit, and see best open source LLMs to run locally.
Setting up the software
Ollama
Ollama detects multiple GPUs automatically and spreads a model's layers across them when it does not fit on one. You can restrict which GPUs it uses with:
CUDA_VISIBLE_DEVICES=0,1 ollama servellama.cpp
# Split layers across two GPUs in a 1:1 ratio, all layers on GPU
./llama-server -m model-70b-Q4_K_M.gguf -ngl 99 --tensor-split 1,1
# Uneven cards (e.g. 32 GB + 24 GB): split proportionally
./llama-server -m model.gguf -ngl 99 --tensor-split 32,24
# Try row split on similar GPUs
./llama-server -m model.gguf -ngl 99 --split-mode rowKey flags: -ngl (layers on GPU), --tensor-split (proportion per GPU), --split-mode layer|row, --main-gpu.
vLLM (tensor parallelism)
vllm serve <model-name> --tensor-parallel-size 2vLLM requires the model to fit across the GPUs with room for its KV cache and works best with identical GPUs. It shines when serving multiple users thanks to continuous batching. See LLM inference engines compared.
ExLlamaV2/V3 and others
ExLlama-based tools (such as TabbyAPI) support splitting across GPUs with fast quantized formats, and LM Studio offers GPU allocation settings in its interface.
Hardware considerations
PCIe lanes and slots
| Platform | Typical configuration with 2 GPUs | Impact |
|---|---|---|
| Mainstream desktop (consumer Intel/AMD) | x8/x8 or x16/x4 | Fine for layer split inference |
| HEDT/workstation (Threadripper, Xeon W) | x16/x16 or more GPUs at full width | Better for tensor parallelism and training |
| Servers | Many full-width slots | 4–8 GPUs |
For layer-split inference, PCIe bandwidth matters little once the model is loaded, because only small activations pass between GPUs per token. Tensor parallelism and training are much more sensitive. A slot wired at x4 through the chipset still works for inference but loads models more slowly.
NVLink
- RTX 3090 supports an NVLink bridge between two cards, which can help tensor parallel performance.
- RTX 4090 and RTX 50 series have no NVLink; communication goes over PCIe.
- Data center GPUs (H100, B200) use NVLink and NVSwitch for very fast multi-GPU communication.
Power
| Setup | Rated GPU power | Recommended PSU |
|---|---|---|
| 2 × RTX 3090 | 700 W | 1,200 W+ |
| 2 × RTX 4090 | 900 W | 1,500 W+ |
| 2 × RTX 5090 | 1,150 W | 1,600 W+ (or two PSUs) |
| 4 × RTX 3090 | 1,400 W | 2,000 W+ or dual PSUs, power limits |
Tip: power-limit each GPU (for example nvidia-smi -pl 280 on a 3090). Inference speed usually drops only slightly, while total power and heat fall substantially. Check your household circuit capacity too. See GPU power consumption for AI.
Physical space and cooling
- Modern high-end GPUs are 3–4 slots thick. Check motherboard slot spacing and case size.
- Blower-style or water-cooled cards are easier to stack.
- PCIe riser cables and open-frame cases are popular for 3–4 GPU rigs.
- Leave space between cards; the top card in a stack often runs hottest.
System RAM and CPU
Have at least as much system RAM as total VRAM (more for MoE expert offload), and a CPU with enough PCIe lanes for your GPU count. See how to build an AI workstation.
Mixing different GPUs
- llama.cpp / Ollama: mixing works well (for example a 5090 with a 3090). Speed is limited by the slower card for its share of layers.
- vLLM tensor parallelism: use identical GPUs.
- Mixing generations: use a driver and CUDA version that supports all cards.
- Mixing NVIDIA and AMD: possible with some backends (for example Vulkan in llama.cpp) but more complex.
Realistic performance expectations
| Configuration | Single-user generation (70B, 4-bit, rough guide) |
|---|---|
| 2 × RTX 3090, layer split | Typically around 15–20 tokens/s |
| 2 × RTX 4090, layer split | Similar or slightly faster (memory-bandwidth bound) |
| 2 × RTX 3090/4090, tensor parallel | Can be noticeably faster than layer split |
| Partial CPU offload | Often under 5 tokens/s |
Single-user token generation is limited by memory bandwidth; tensor parallelism helps because both GPUs read their half of the weights at the same time. Actual numbers vary with software, quantization and context length.
Multi-GPU vs alternatives
| Option | Pros | Cons |
|---|---|---|
| Multi-GPU consumer rig | Fast, flexible, upgradeable | Power, heat, noise, complexity |
| Single large-VRAM workstation GPU (e.g. 96 GB) | Simple, one card | Expensive |
| Mac with large unified memory | Quiet, efficient, huge memory | Slower prompt processing; no CUDA |
| Cloud GPUs | No upfront cost, scale up instantly | Ongoing cost; see the GPU cloud price tracker |
Also see rent vs buy a GPU and best GPU for local LLMs.
Troubleshooting
| Problem | Likely fix |
|---|---|
| Only one GPU used | Check nvidia-smi, CUDA_VISIBLE_DEVICES and tool GPU settings |
| Out of memory on one GPU | Adjust --tensor-split; the first GPU often needs extra room for buffers |
| Slow generation | Ensure all layers are on GPU (-ngl 99); try row split or tensor parallelism |
| System shuts down under load | PSU overload; apply power limits or upgrade PSU |
| GPUs overheating | Improve spacing and airflow; use power limits |
Frequently asked questions
Does adding a second GPU double speed?
Not with layer splitting, which mainly adds memory. Tensor parallelism can increase speed, but rarely by a full 2×.
Can I use two different GPUs for an LLM?
Yes, with llama.cpp, Ollama or LM Studio. vLLM tensor parallelism works best with identical GPUs.
Do I need NVLink for multi-GPU inference?
No. Layer-split inference works well over PCIe. NVLink helps tensor parallelism and training.
Is 2 × RTX 3090 still worth it?
For running 70B-class models on a budget, two used RTX 3090s remain one of the best-value options thanks to 48 GB total VRAM and NVLink support.
Sources and further reading
- llama.cpp on GitHub
- vLLM documentation, Parallelism and scaling
- Shoeybi et al., Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelism (2019)
- Ollama documentation




Leave a Reply