Tensor Parallel vs Pipeline Parallel
| Method | How it splits | Best for | vLLM | llama.cpp |
|---|---|---|---|---|
| Tensor parallel | Every layer is cut across all the cards | Fast answers; cards linked by NVLink | --tensor-parallel-size N | --split-mode tensor (experimental) |
| Pipeline parallel | Each card holds a run of layers | Cards linked only by PCIe; uneven counts | --pipeline-parallel-size N | --split-mode layer (default) |
| Separate copies | A full model on each card | Many users, when the model fits on one card | One server per GPU | One server per GPU |
Tensor parallelism makes the cards exchange data several times per layer, so a slow link holds it back; pipeline parallelism passes data only between stages. Sources: vLLM parallelism and scaling and llama.cpp multi-GPU guide.
Our Multi-GPU Servers
| Plan | GPU | Total GPU memory | System memory | Runs | Price |
|---|---|---|---|---|---|
| AMD EPYC 7702 w/ 4x NVIDIA RTX 3090 | 4× NVIDIA RTX 3090 · 24 GB each | 96 GB | 128 GB | About 120B at 4-bit; vLLM, llama.cpp or Ollama | $929.00/mo |
| AMD EPYC 7443P w/ 4x NVIDIA V100 16GB | 4× NVIDIA V100 · 16 GB each | 64 GB | 128 GB | About 70B at 4-bit; llama.cpp or Ollama | $1,059.00/mo |
| AMD EPYC 7443P w/ 4x NVIDIA V100 32GB | 4× NVIDIA V100 · 32 GB each | 128 GB | 128 GB | About 120B at 4-bit; llama.cpp or Ollama | $1,059.00/mo |
| AMD EPYC 7443P w/ 4x NVIDIA V100 | 4× NVIDIA V100 | — | 256 GB | llama.cpp or Ollama | $1,189.00/mo |
| Intel Dual Xeon Platinum 8260 w/ 8x NVIDIA V100 | 8× NVIDIA V100 · 32 GB each | 256 GB | 1 TB | About 120B at 4-bit; llama.cpp or Ollama | $1,319.00/mo |
| AMD EPYC 9B14 w/ 2x NVIDIA RTX 5090 | 2× NVIDIA RTX 5090 · 32 GB each | 64 GB | 384 GB | About 70B at 4-bit; vLLM, llama.cpp or Ollama | $2,639.00/mo |
| AMD EPYC 9254 w/ 4x NVIDIA RTX 5090 | 4× NVIDIA RTX 5090 · 32 GB each | 128 GB | 384 GB | About 120B at 4-bit; vLLM, llama.cpp or Ollama | $3,819.00/mo |
vLLM needs an NVIDIA GPU of compute capability 7.5 or higher, and the V100 is 7.0, so use llama.cpp or Ollama on V100s. What fits at each precision is in how much VRAM an LLM needs.
1. Check the Cards and How They Are Linked
nvidia-smi # every card should be listed, with free memory nvidia-smi topo -m # NV# between two cards means NVLink; anything else is PCIe
A card missing? Start with installing the NVIDIA drivers.
2. vLLM Across Several GPUs
openssl rand -hex 24 > ~/.llm-key # tensor parallel on 2 GPUs vllm serve Qwen/Qwen3.8-27B-FP8 --tensor-parallel-size 2 \ --host 127.0.0.1 --api-key "$(cat ~/.llm-key)" # pipeline parallel on 2 GPUs, for cards without NVLink vllm serve Qwen/Qwen3.8-27B-FP8 --pipeline-parallel-size 2 \ --host 127.0.0.1 --api-key "$(cat ~/.llm-key)"
The two multiply: --tensor-parallel-size 4 --pipeline-parallel-size 2 uses eight cards. Try both on your own cards and keep the faster one; vLLM's own Qwen3.8 recipe runs tensor parallel on two RTX 5090s. When vLLM starts, look for these lines:
GPU KV cache size: how many tokens of conversation fit at once.Maximum concurrency: about how many full-length requests run together. Too low? Add GPUs or lower--max-model-len.
In Docker, pass --gpus all and --ipc=host; the cards share data through shared memory.
3. llama.cpp Across Several GPUs
llama serve --list-devices # names such as CUDA0, CUDA1 # layers spread over every card (the default) llama serve -hf ggml-org/Qwen3.8-27B-GGUF:Q8_0 --host 127.0.0.1 --port 8080 # three quarters on the first card, one quarter on the second llama serve -hf ggml-org/Qwen3.8-27B-GGUF:Q8_0 --tensor-split 3,1 \ --host 127.0.0.1 --port 8080 # only one card llama serve -hf ggml-org/Qwen3.8-27B-GGUF:Q8_0 --device CUDA1 \ --host 127.0.0.1 --port 8080
--split-mode tensor can answer faster but is experimental, does not support every model, needs an unquantized cache (-ctk f16 -ctv f16) and turns off automatic fitting, so set -c yourself. --split-mode row is deprecated.
4. Ollama Across Several GPUs
Nothing to set: Ollama puts a model on one GPU if it fits there, and otherwise spreads it across all of them. To limit which cards it uses, run sudo systemctl edit ollama.service and add:
[Service] Environment="CUDA_VISIBLE_DEVICES=0,1"
Then sudo systemctl daemon-reload && sudo systemctl restart ollama, and check with ollama ps and nvidia-smi (Ollama GPU docs).
5. One Copy per GPU for More Users
When the model fits on one card, a copy on each serves more people than one split copy. Give each its own card and port, and balance between them with Caddy or LiteLLM:
CUDA_VISIBLE_DEVICES=0 vllm serve openai/gpt-oss-20b --port 8001 \ --host 127.0.0.1 --api-key "$(cat ~/.llm-key)" & CUDA_VISIBLE_DEVICES=1 vllm serve openai/gpt-oss-20b --port 8002 \ --host 127.0.0.1 --api-key "$(cat ~/.llm-key)" &
llm.example.com {
reverse_proxy 127.0.0.1:8001 127.0.0.1:8002
}Common Multi-GPU Errors
| Message | Meaning | Fix |
|---|---|---|
| Total number of attention heads must be divisible by tensor parallel size (vLLM) | The model's heads do not split evenly over that many cards | Use 2, 4 or 8, or tensor parallel 1 with --pipeline-parallel-size |
| SPLIT_MODE_TENSOR requires flash_attn to be enabled (llama.cpp) | Tensor mode needs flash attention | Add -fa on, or remove -fa off |
| LLAMA_SPLIT_MODE_TENSOR not implemented for architecture (llama.cpp) | That model type cannot use tensor mode | Use --split-mode layer |
| NCCL is unavailable, multi GPU performance will be suboptimal (llama.cpp) | llama.cpp was built without NCCL | Install NCCL and rebuild, or accept the slower speed |
| CUDA out of memory on one card only | Uneven split, or another program on that card | Change --tensor-split, or free the card |
For memory errors in general, see fixing CUDA out of memory. Deciding between one large card and several smaller ones? See the best GPU for running LLMs.
NVIDIA, NVLink, GeForce and RTX are trademarks of their respective owners. Virteche is not affiliated with or endorsed by them. Details about their products come from their public documentation as of the date at the top of this guide.