Multi GPU LLM setups work: layer split pools VRAM, tensor parallel adds speed. How llama.cpp, Ollama, vLLM and SGLang split models, and when PCIe matters.
Yes. A multi GPU LLM setup can run one model across two or more cards. Layer split (llama.cpp's default, Ollama, pipeline parallel) pools VRAM so a bigger model fits but runs about as fast as one card. Tensor parallel (vLLM, SGLang, llama.cpp's experimental -sm tensor) slices every layer across cards and raises generation speed, at the cost of more GPU-to-GPU traffic.
- none, layer, row, tensor
- -sm layer
- 2.27x generation
- OLLAMA_SCHED_SPREAD=1
Key takeaways
- Layer split pools memory, not speed: each GPU holds whole layers and they take turns. It tolerates mixed cards and slow PCIe.
- Tensor parallel makes all GPUs work on every layer at once. In llama.cpp's own PR benchmarks it raised 70B Q4_K_M generation on 4x RTX 4090 from 21.25 to 48.31 tok/s.
- Ollama puts a model on one GPU if it fits and spreads it only if it doesn't; OLLAMA_SCHED_SPREAD=1 forces the spread.
- vLLM's docs recommend pipeline parallel over tensor parallel when GPUs lack NVLink, and for uneven splits.
- Community reports say PCIe lane count barely moves layer-split generation speed; it shows up in prompt processing and tensor parallel.
A multi GPU LLM setup is normal in 2026: every major local runtime can put one model on two or more cards. What you get out of it depends on how the model is split. Splitting by layers lets a model that is too big for one card fit, but it doesn’t make it faster. Splitting inside each layer (tensor parallel) makes it faster, but it needs matched cards, a runtime that supports it, and more bandwidth between GPUs. This page explains both, shows the flags each runtime uses, and collects what developers with dual-3090, mixed-card and four-card rigs report. Docs were fetched on 2026-10-28. To size a single card first, see local LLM hardware requirements.
Can you combine GPUs for one model?
Yes: VRAM from several GPUs can be pooled to hold one model, and the runtime handles the split for you.
Two 24 GB cards give you about 48 GB to hold weights and KV cache, so a model that needs 40 GB loads without spilling into system RAM. Spilling to RAM is what really kills speed, so pooling is the main reason people buy a second card. Pooling is not the same as doubling speed, though. With the default split, the cards take turns, so one user’s tokens come out at roughly single-card speed. Speed gains come only from tensor parallelism, covered below.
What are the ways to split a model across GPUs?
There are two basic methods: layer split (pipeline parallel) and tensor parallel. A third option, data parallel, runs a full copy on each GPU and only helps when you serve many users.
- Layer split (pipeline). GPU 0 holds the first block of layers, GPU 1 holds the rest. Only a small activation tensor crosses the bus at each boundary. Cards can differ in size, since you just give the bigger card more layers. The cost is that one GPU sits idle while the other computes.
- Tensor parallel. Every weight matrix is cut into slices, and each GPU computes its slice of every layer at the same time. The GPUs then sync partial results (an all-reduce) inside each layer. That is far more traffic, so link speed and matched cards matter.
- Row split. This is llama.cpp’s older middle ground: weights are split by rows, while the main GPU keeps intermediate results and KV cache.
- Data parallel. Each GPU runs a full copy of the model. It needs the model to fit on one card and helps throughput, not single-request speed.
| Method | Pools VRAM | Faster for one user | Mixed cards | Link sensitivity |
|---|---|---|---|---|
| Layer split / pipeline | Yes | No (about one card’s speed) | Yes, uneven splits supported | Low |
| Row split (llama.cpp) | Yes | Sometimes | Possible | Medium |
| Tensor parallel | Yes | Yes, mainly generation | Best with identical cards | High |
| Data parallel | No | No (more total throughput) | Yes | Very low |
How does each runtime handle multiple GPUs?
llama.cpp exposes every mode as a flag, Ollama decides for you, and vLLM and SGLang want an explicit parallel size.
llama.cpp. The server README lists -sm, --split-mode {none,layer,row,tensor}. layer is the default and “split layers and KV across GPUs (pipelined)”. row splits weights by rows, and tensor splits “weights and KV across GPUs (parallelized, EXPERIMENTAL)”. -ts, --tensor-split 3,1 sets each card’s share, -mg picks the main GPU, and -dev limits which devices are used.
# default layer split, 60/40 across two cards
llama-server -m model.gguf -ngl 99 -sm layer -ts 3,2
# experimental tensor parallel (set context manually, flash attention on)
llama-server -m model.gguf -ngl 99 -sm tensor -fa on -c 32768Tensor mode arrived in PR #19378, merged on 2026-04-09 and labeled “not yet production ready”. At merge it needed FlashAttention on and KV cache quantization off, didn’t support -fit (so you set --ctx-size yourself), and listed several model architectures as broken. It was tested mainly on CUDA, where NCCL is recommended. The author found ROCm slower than layer split on their hardware and Vulkan unstable at long context. Recheck the PR and current releases before relying on it.
The PR’s own numbers show the trade-off. On 2x RTX 4090 with Llama 8B F16, generation rose from 60.28 to 96.63 tok/s while prompt processing (pp512) dropped from 10,624 to 8,119 tok/s. On 4x RTX 4090, Llama 70B Q4_K_M generation went from 21.25 to 48.31 tok/s.
Ollama. The FAQ says that if a model “will entirely fit on any single GPU, Ollama will load the model on that GPU”, because that avoids PCIe traffic. It spreads across all GPUs only when the model doesn’t fit. That’s the usual answer to “Ollama not using all GPUs”: the default is working as designed. OLLAMA_SCHED_SPREAD=1 (“Always schedule model across all GPUs”, per envconfig) forces the spread, and CUDA_VISIBLE_DEVICES or ROCR_VISIBLE_DEVICES limits which cards Ollama sees. If a card doesn’t show up at all, that’s a driver or detection problem, covered in Ollama not using GPU.
vLLM and SGLang. Both use explicit sizes. vLLM’s Parallelism and Scaling docs say to use tensor parallelism when a model fits on one node with several GPUs (--tensor-parallel-size). They recommend pipeline parallelism (--pipeline-parallel-size) when the GPUs lack NVLink, and for uneven splits. SGLang’s server arguments are --tp-size, --pp-size and --dp-size. For which of the two to pick, see vLLM vs SGLang.
vllm serve <model> --tensor-parallel-size 2
python -m sglang.launch_server --model-path <model> --tp 2We build CandorNo GPU? Use a hosted model
Uncensored AI, right in your browser.
Candor runs open models with refusals removed, so it answers the questions other assistants deflect. New accounts get free credits, no card needed.
Try Candor freeDoes PCIe lane count or NVLink matter for inference?
For layer split, PCIe lanes barely matter once the model is loaded. For tensor parallel, link speed matters, and slow links eat into the gain.
Layer split sends little data per token, so x8 or even x4 slots are usually fine for generation. Tensor parallel syncs inside every layer, so it is the mode that benefits from x16 slots and NVLink. NVIDIA’s NVLink bridge page lists up to 112 GB/s with a single bridge on RTX A6000/A5000-class cards. On the consumer side, the GeForce RTX 3090 (GA102) has an NVLink bridge rated at 112.5 GB/s, and NVIDIA removed the connector with the Ada Lovelace generation in 2022, so the RTX 4090 has none (Wikipedia, NVLink). That is part of why bridged dual-3090 builds still come up so often.
Prefill (prompt processing) is where bandwidth and sync costs show up first. A r/LocalLLM thread asking why -sm tensor made prefill much slower and decode much faster got this explanation: tensor split syncs every layer during prefill, while decode is bound by memory bandwidth (thread). The poster later traced most of the prefill slowdown to NCCL not loading.
Can you mix different GPUs or vendors?
Yes for layer split. Tensor parallel works best with identical cards.
Layer split doesn’t care if cards are equal: -ts in llama.cpp, or vLLM’s pipeline parallel (which “supports uneven splits”), gives the bigger card more layers. The slowest card sets the pace for its share of the layers. Tensor parallel splits each layer evenly, so the slowest or smallest card holds back the whole group. Mixing NVIDIA and AMD in one process is something community members report doing (see the next section), but the backend you choose matters, and the AMD GPU guide covers ROCm and Vulkan specifics.
What do developers report in practice?
Community reports match the theory: pooling works on mismatched cards, and tensor split adds generation speed on matched NVIDIA cards. Results on AMD and Vulkan are mixed. These are reports from other developers, not tests run by Refusal Rate.
- Three 7900 XTX cards, Qwen 3.6 27B Q8, llama.cpp. The poster’s own benchmark: ROCm layer split did about 960 tok/s prefill and 20.2 tok/s generation, and ROCm tensor split did about 522 prefill and 31.8 generation. Vulkan tensor split fell to 6.6 tok/s generation (r/LocalLLaMA).
- RTX 3090 Ti + RTX 3090. A commenter in the same thread reported about a 50% generation speedup with
-sm tensorover-sm layerat Q8 (r/LocalLLaMA). - Mixed vendors. Another commenter runs a 7900 XTX with part of the model on an RTX 4060 Ti, at speeds similar to the 3x AMD setup with a Q6 quant (r/LocalLLaMA).
- PCIe x16 to x4. One user dropped four AMD V620s from Gen4 x16 to x8 to x4 running
-sm tensorand saw generation hold at about 14 tok/s throughout. Another measured inter-GPU traffic and found it rarely topped about 1 GB/s (r/LocalLLaMA). - Cheap second cards. In a “should I buy a second GPU” thread, one owner ran two RTX 5060 Ti 16 GB plus an RTX 3060 12 GB, one of them on a Gen3 x1 riser. They reported 25 to 30 tok/s generation and about 500 tok/s prefill on Qwen 3.6 27B Q8 at 100k context (r/LocalLLM).
- Where it stops scaling. A Hacker News commenter argued that a third RTX 3090 makes PCIe bandwidth a problem if you want tensor parallel across three cards, since 3x PCIe 5 x16 with direct CPU lanes is expensive (HN).
The pattern: on mixed or AMD rigs, layer split is the safe default. On two or four matched CUDA cards, -sm tensor, vLLM or SGLang are worth benchmarking for generation speed.
Is two mid cards better than one big card?
Two cards win on VRAM per dollar. One big card wins on simplicity, power and prefill speed.
| Situation | Better choice | Why |
|---|---|---|
| Model fits on one card you can buy | One card | No split overhead; Ollama prefers this anyway |
| Model needs 32 to 48 GB, budget-limited | Two used 24 GB cards | Pooled VRAM avoids slow RAM offload |
| You already own a GPU | Add a cheaper second card | Layer split handles mismatched sizes |
| You want max tokens/s for one user | Matched pair + tensor parallel | Generation scales; prefill may not |
| Serving a team | Matched cards + vLLM/SGLang | Batching and TP; see self-hosting for a dev team |
| Board has one x16 slot, rest x4 | Fine for layer split | Low per-token traffic |
Also budget for power, cooling, and a board that can physically fit two cards. Those costs are real and outside the scope of this page.
FAQ
Can Ollama use two GPUs?
Yes. Ollama spreads a model across all GPUs automatically when it doesn’t fit on one, and OLLAMA_SCHED_SPREAD=1 forces that even when it would fit.
Does a second GPU double LLM speed?
Not with the default layer split, which mostly adds memory. Tensor parallel can add a lot: llama.cpp’s PR measured 2.27x on 70B generation with four RTX 4090s. Prefill may get slower.
Do I need NVLink to run a multi GPU LLM?
No. Layer split works fine over PCIe. NVLink helps tensor parallel, and vLLM recommends pipeline parallel on GPUs without it.
Can I use an NVIDIA and an AMD GPU together?
Community reports say yes for layer split with llama.cpp, as long as the backend you build or run can see both cards. For tensor parallel, plan on identical cards.
Why is llama.cpp only using one GPU?
Check -sm (none uses one GPU), -dev, -ts and CUDA_VISIBLE_DEVICES. With -sm layer, the cards also take turns, so seeing only one card busy at a time is normal.
We build CandorSkip the setup
Want an uncensored model without hosting one?
Candor (candorai.dev) is an uncensored AI chat app that runs in your browser: it answers the questions mainstream assistants dodge, on health, money, law and work, without the lecture. New accounts get free credits, no card needed.
Facts from candorai.dev, checked Nov 10, 2026. Candor never changes how we rank or review models. Disclosure.
Sources (10)
- llama.cpp server README: --split-mode, --tensor-split, --main-gpu, --device (ggml-org/llama.cpp)
- llama.cpp PR #19378: backend-agnostic tensor parallelism (experimental), merged 2026-04-09
- Ollama FAQ: How does Ollama load models on multiple GPUs?
- vLLM docs: Parallelism and Scaling
- SGLang docs: Server Arguments (--tp-size, --pp-size, --dp-size)
- NVLink, Wikipedia: GA102 (RTX 3090) bridge at 112.5 GB/s; connector removed on Ada Lovelace
- NVIDIA: NVLink bridges, supported GPUs and bandwidth
- r/LocalLLaMA: Qwen 3.6 27B llama.cpp multi-GPU prompt processing help
- r/LocalLLaMA: Does anyone know what PCIe mode was used for these benchmarks?
- r/LocalLLM: Should I buy second GPU?
Written by Refusal Rate editors from papers, model cards, official docs and pricing pages. Anything we ran ourselves is labeled as our own test, with the hardware and settings. Our method.