refusal rate
Subscribe

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.

[ fig. 01 — explainer ]48×5
[ fig. 01 — explainer ]16×5

Short answer

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.

llama.cpp split modes
none, layer, row, tensor
Default
-sm layer
4x 4090, 70B, -sm tensor
2.27x generation
Ollama force-spread
OLLAMA_SCHED_SPREAD=1

Key takeaways

  1. Layer split pools memory, not speed: each GPU holds whole layers and they take turns. It tolerates mixed cards and slow PCIe.
  2. 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.
  3. 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.
  4. vLLM's docs recommend pipeline parallel over tensor parallel when GPUs lack NVLink, and for uneven splits.
  5. 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.

[ fig. 01 — Layer split vs tensor parallel, simplified ]
Layer split gives each GPU whole layers and passes activations once per boundary; tensor parallel slices every layer across all GPUs and syncs them inside every layer, which needs fast links between cards.
  • 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.
MethodPools VRAMFaster for one userMixed cardsLink sensitivity
Layer split / pipelineYesNo (about one card’s speed)Yes, uneven splits supportedLow
Row split (llama.cpp)YesSometimesPossibleMedium
Tensor parallelYesYes, mainly generationBest with identical cardsHigh
Data parallelNoNo (more total throughput)YesVery 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.

bash
# 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 32768

Tensor 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.

[ fig. 02 — Source: llama.cpp PR #19378 description, author's benchmarks ]
In llama.cpp's tensor-parallel PR benchmarks, -sm tensor made token generation 1.60x to 2.27x faster than -sm layer on RTX 4090s, but prompt processing on two cards was 0.76x, slower.

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.

bash
vllm serve <model> --tensor-parallel-size 2
python -m sglang.launch_server --model-path <model> --tp 2

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 tensor over -sm layer at 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 tensor and 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.

SituationBetter choiceWhy
Model fits on one card you can buyOne cardNo split overhead; Ollama prefers this anyway
Model needs 32 to 48 GB, budget-limitedTwo used 24 GB cardsPooled VRAM avoids slow RAM offload
You already own a GPUAdd a cheaper second cardLayer split handles mismatched sizes
You want max tokens/s for one userMatched pair + tensor parallelGeneration scales; prefill may not
Serving a teamMatched cards + vLLM/SGLangBatching and TP; see self-hosting for a dev team
Board has one x16 slot, rest x4Fine for layer splitLow 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.

Sources (10)
  1. llama.cpp server README: --split-mode, --tensor-split, --main-gpu, --device (ggml-org/llama.cpp)
  2. llama.cpp PR #19378: backend-agnostic tensor parallelism (experimental), merged 2026-04-09
  3. Ollama FAQ: How does Ollama load models on multiple GPUs?
  4. vLLM docs: Parallelism and Scaling
  5. SGLang docs: Server Arguments (--tp-size, --pp-size, --dp-size)
  6. NVLink, Wikipedia: GA102 (RTX 3090) bridge at 112.5 GB/s; connector removed on Ada Lovelace
  7. NVIDIA: NVLink bridges, supported GPUs and bandwidth
  8. r/LocalLLaMA: Qwen 3.6 27B llama.cpp multi-GPU prompt processing help
  9. r/LocalLLaMA: Does anyone know what PCIe mode was used for these benchmarks?
  10. r/LocalLLM: Should I buy second GPU?

Keep reading

[ fig. 02 — hardware ]18×8

What are the hardware requirements for a local LLM for coding?

Oct 27, 2026 · Hardware

Memory for a local coding LLM is weights plus KV cache plus about 1 GB of overhead. Weights are parameters times bits per weight divided by 8. At Q4_K_M a 9B model needs about 5.7 GB, a 27B about 16.5 GB and a 35B MoE about 22 GB, before context. Recent Qwen models cache only 64 KiB per token or less, so long context costs far less than it did.

Read
[ fig. 03 — comparison ]18×8

vLLM vs SGLang: which inference server should you run?

Nov 2, 2026 · Comparison

vLLM and SGLang are the two main open-source servers for running open-weight LLMs for many users at once. On unique prompts they benchmark within a few percent of each other. SGLang pulls ahead when requests share long prefixes, as in agents, RAG and multi-turn chat, thanks to RadixAttention. vLLM has the broader model, quantization and hardware-plugin coverage, and is the safer default when your traffic has no dominant shared prefix.

Read
[ fig. 04 — how-to ]18×8

Can you run local LLMs well on an AMD GPU?

Nov 2, 2026 · How-to

Yes. AMD GPUs run local LLM inference well through llama.cpp, Ollama and LM Studio, using either the ROCm (HIP) backend or the Vulkan backend. Recent RDNA3 and RDNA4 Radeon cards are officially supported by ROCm on Linux, and Vulkan works on far more hardware, including older cards and iGPUs. The costs are fiddlier setup, weaker prompt processing on some cards, and no CUDA-only tooling.

Read