Start with vLLM for a shared model API on a supported Linux GPU and Ollama if you want to launch local models with a single command. Choose llama.cpp when you have a GGUF file and want to control how many layers to offload and how many requests to handle at once. vLLM quickstart, Ollama FAQ, llama.cpp server reference.
Match the runtime to your GPU
| Runtime | NVIDIA | AMD | Apple Silicon |
|---|---|---|---|
| vLLM | The Linux CUDA path requires compute capability 7.5 or higher. | The Linux ROCm list includes GPUs from the Radeon RX 7900 and RX 9000 series. Check the ROCm version for your chip. | The stable GPU guide points to vLLM-Metal, a community-maintained plugin that uses MLX. vLLM 0.21.0 GPU requirements, vLLM stable GPU guide. |
| Ollama | The GPU guide lists compute capability 5.0 or higher and driver 550 or newer. For compute capabilities 5.0 through 6.2, it requires driver 570 or newer. | Check the separate Linux and Windows ROCm lists. The RX 7900 XTX appears on both. The guide also lists Vulkan for additional Windows and Linux GPUs. | Ollama accelerates inference through Metal. Ollama hardware support. |
| llama.cpp | Use a build with the CUDA backend. | Use a HIP build with ROCm on supported AMD GPUs, or consult the Vulkan build instructions. | Metal is enabled by default when building for macOS. llama.cpp build guide. |
For example, Ollama lists the GTX 1080 Ti at compute capability 6.1, which meets Ollama’s published compute requirement. For NVIDIA GPU acceleration in Ollama, the card needs driver 570 or newer. It falls below the CUDA minimum in the vLLM 0.21.0 guide. Ollama hardware support, vLLM GPU requirements.
When a model needs more than one GPU
- vLLM recommends tensor parallelism on a single node when the model is too large for one GPU and fits across several. If the model fits across the node’s GPUs but cannot be divided evenly between them, its guide recommends pipeline parallelism. vLLM parallelism and scaling.
- Ollama checks available VRAM when loading the model. It uses a single GPU if the model fits entirely on one and spreads the model across the available GPUs otherwise. Ollama FAQ.
- llama.cpp defaults to the
layersplit mode. It places a range of layers on each GPU and keeps each layer’s key-value (KV) cache with that layer. The--n-gpu-layersflag sets the maximum number of layers to place in VRAM. llama.cpp multi-GPU guide, llama.cpp server reference.
Configure two overlapping requests
Use two overlapping requests and a 4,096-token context target as a worked example. Each command assumes the runtime is already installed.
vLLM sets a per-iteration sequence limit
Use the model from the vLLM quickstart. Set the combined prompt and output limit with --max-model-len and cap each scheduling iteration at two sequences with --max-num-seqs. vLLM quickstart, vLLM serve reference.
vllm serve Qwen/Qwen2.5-1.5B-Instruct --host localhost \
--max-model-len 4096 --max-num-seqs 2 --enable-logging-iteration-details
Run the following request in two terminals. Prepare both commands, then submit them in quick succession. vLLM quickstart.
curl http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "Qwen/Qwen2.5-1.5B-Instruct",
"messages": [
{"role": "user", "content": "Write a long, detailed guide to growing tomatoes, from seed to harvest."}
]
}'
With --max-num-seqs 2 set, look in the server’s iteration logs for two generation requests in the same iteration. If the requests finish too quickly to overlap, try a prompt that asks for a longer answer. To check the lower limit, restart with --max-num-seqs 1 and repeat the pair. Look for at most one generation request per iteration. vLLM serve reference.
For cache sizing, use the startup log’s GPU KV cache size and Maximum concurrency lines. The latter estimates cache capacity at the reported tokens per request. That token count comes from the configured maximum model length. Use the iteration logs for the request check. If memory is tight, lower --max-model-len or --max-num-seqs. vLLM parallelism and scaling, vLLM memory guide.
Ollama sets parallel requests per model
On platforms that support both settings, set the context and parallel limit when starting Ollama from a shell. When sufficient memory is available to configure two parallel requests for a model, a 4,096-token context gives a combined context of 8,192 tokens. Ollama context guide, Ollama FAQ.
OLLAMA_CONTEXT_LENGTH=4096 OLLAMA_NUM_PARALLEL=2 ollama serve
With the server running, preload a model and check its allocation. Ollama FAQ, Ollama context guide.
ollama run llama3.2 ""
ollama ps
Read CONTEXT for the allocated context and PROCESSOR for GPU and CPU placement. Ollama context guide, Ollama FAQ.
Run the following request in two terminals, starting the second while the first is still generating. Ollama’s /api/generate streams newline-delimited JSON by default. Look for generated text in the response field of the second stream before the first stream’s done field becomes true. Ollama FAQ, Ollama streaming guide.
curl http://localhost:11434/api/generate -d '{
"model": "llama3.2",
"prompt": "Write a long, detailed guide to growing tomatoes, from seed to harvest.",
"options": {"num_ctx": 4096}
}'
For a comparison, stop the shell server, restart it with OLLAMA_NUM_PARALLEL=1, preload the same model, and repeat the pair. If generation overlaps with the limit set to two and runs one request at a time with the limit set to one, the setting is taking effect for this model. Ollama FAQ.
When Ollama is busy, OLLAMA_MAX_QUEUE sets how many requests can wait before it rejects new ones. If memory is tight, reduce the context length or the parallel request limit. For the macOS app or Linux systemd service, set the same variables using the platform-specific instructions. Ollama context guide, Ollama FAQ.
llama.cpp sets server slots and a per-slot limit
Replace model.gguf with the path to your GGUF model. This configuration sets two server slots that share a KV cache, with a 4,096-token context limit on each slot. With --ctx-size omitted, the documented pool-size calculation is two times 4,096, or 8,192 tokens. llama.cpp server reference.
llama-server -m model.gguf --parallel 2 --kv-unified \
--kv-unified-per-slot 4096
Open http://127.0.0.1:9931/slots to see the slots and their is_processing state. To request a smaller shared pool with this configuration, lower the per-slot context limit or the slot count. llama.cpp server reference.
Evidence and limits. Sources checked on 2026-11-26 include the vLLM 0.21.0 docs and stable GPU guide, Ollama’s rolling docs, and the llama.cpp v1.1.0 docs. The example commands were not run. No performance measurements were taken.