How llama.cpp splits a model across cards, what the inter-GPU tax actually costs, why the RTX 3090's NVLink is still the only bridge that matters, and how CPU offloading works when a model outgrows the VRAM.
llama.cpp splits a model's transformer layers across GPUs (-sm layer). Two
rules of thumb:
| Interconnect | Available on | Link speed | Split tax |
|---|---|---|---|
| NVLink (2-way only) | RTX 3090 / 3090 Ti | 112.5 GB/s | ~10–15% |
| PCIe 4.0 x16 | RTX 30 / 40 Series (all other cards) | ~31 GB/s per dir. | ~25–35% |
| PCIe 5.0 x16 | RTX 50 Series | ~63 GB/s per dir. | ~20–30% (est.) |
So 2× 3090 (NVLink) lands around ~85–90% of the sum of single-card speeds on token generation, while 2× 4090 or 2× 5090 (PCIe-only) land around 65–80%. Prompt processing scales nearly linearly in all cases because the per-token activation traffic is a much smaller fraction of that phase.
The RTX 3090/3090 Ti are the only consumer cards ever shipped with a fast GPU-to-GPU bridge. The RTX 40 and 50 Series dropped it; no bridge, no shortcut. Consequences:
Mixed-generation pairs work too: a 3090 + 5090 (56 GB) pair runs 70B with the faster card
doing more layers. Weight the split toward the bigger/faster card with
--tensor-split. The cross-series comparison
has the build-by-build tables.
llama.cpp's -ngl N puts the last N transformer layers on the CPU and
the rest on the GPUs. The number to internalize: offloaded layers run at CPU speed
(~1–3 t/s for a 27B model on a modern 8-core), so the penalty is not proportional:
| Scenario | On CPU | Result |
|---|---|---|
| 27B Q4 in 24 GB: last ~4 layers on CPU to fit | ~6% | ~85% of full-GPU speed |
| 27B Q4 in 16 GB: ~half the layers offloaded | ~50% | ~3–5 t/s — a different machine |
| 70B Q4 in 24 GB: ~2/3 offloaded | ~67% | ~2–3 t/s — demo territory |
--n-cpu-moe moves MoE expert weights to CPU —
cheap, because only a few experts are read per token. Great for MoE models in tight VRAM.-ot output=CPU parks the big final layer
(~0.5–1 GB on 27B/70B) on CPU — a free VRAM win with negligible speed cost.llama-server -m 27b-q4_k_m.gguf -ngl 60 -sm layer -c 8192 --tensor-split 1,1 -ot output=CPU
27B Q4 across 2 GPUs, last 4 layers + output embedding on CPU
llama-server -m model-q4_k_m.gguf -ngl 99 -sm layer --tensor-split 1,1llama-server -m model.gguf -ngl 99 -sm layer --tensor-split 60,40llama-server -m 70b-q4_k_m.gguf -ngl 99 -sm layer -c 32768 --tensor-split 1,1,1llama-server -m 70b-q5_k_m.gguf -ngl 99 -sm layer -c 32768 --tensor-split 1,1,1,1 -ot output=CPU