llama.cpp vs vLLM vs Ollama: which inference server should you pick?
The three most popular ways to run models locally. We compare convenience, performance, multi-user serving and the hardware each of them makes sense on.
3 minutes read Czytaj po polsku

On this page (7)
Key takeaways
- Ollama is the most convenient and the best place to start.
- llama.cpp gives you full control and handles offloading to RAM best.
- vLLM wins with many parallel requests, but the model has to fit in VRAM.
- All three expose an OpenAI-compatible API.
All three expose an OpenAI-compatible API, all three are open source and all three can run the same model. What sets them apart is who they are built for.
At a glance
| Ollama | llama.cpp | vLLM | |
|---|---|---|---|
| Model format | GGUF (own registry) | GGUF | safetensors, AWQ, GPTQ, FP8 |
| Installation | one command | binary or build | Python / Docker |
| CPU + GPU (offload) | yes | yes, with full control | practically no |
| Many users at once | limited | decent | best |
| Model management | ollama pull | manual | from Hugging Face |
| Who it is for | getting started, desktop, homelab | enthusiasts, weaker hardware | servers, teams, agents |
Ollama: convenience first
Under the hood Ollama is llama.cpp with a layer that downloads models, loads them on demand and frees memory when nobody is using them. For most people it is the best place to start.
ollama pull qwen3:14b
ollama run qwen3:14bPros: zero configuration, automatic choice of how many layers go to the GPU, switching models on the fly, a huge ecosystem of integrations.
Cons: less control over parameters, new llama.cpp features reach Ollama with a delay, and some defaults (such as the context length) can be surprisingly modest.
llama.cpp: full control
The project that started the whole local model scene. llama-server is a single binary with an HTTP server and a simple web interface.
llama-server \
-m ~/models/Qwen3-32B-Q4_K_M.gguf \
-ngl 99 \
-c 16384 \
-fa on \
--cache-type-k q8_0 --cache-type-v q8_0 \
--host 0.0.0.0 --port 8080| Flag | Meaning |
|---|---|
-ngl 99 | how many layers to put on the GPU (99 = all) |
-c 16384 | context length |
-fa on | flash attention |
--cache-type-k/v | KV cache quantization |
Pros: the newest features right away, precise offloading (you can put exactly as many layers on the GPU as will fit, or offload only the experts of an MoE model), and it runs on everything from a Raspberry Pi to multiple GPUs.
Cons: you download and update models yourself, and one server serves one model (unless you add a router such as llama-swap).
vLLM: throughput for many
vLLM was built to serve models to many users at once. Its two key techniques are PagedAttention (the KV cache is managed like virtual memory, with no wasted space) and continuous batching (new requests join the running batch instead of waiting in a queue).
docker run --gpus all -p 8000:8000 --ipc=host \
-v ~/.cache/huggingface:/root/.cache/huggingface \
vllm/vllm-openai:latest \
--model Qwen/Qwen3-8B \
--max-model-len 16384 \
--gpu-memory-utilization 0.90Pros: with many parallel requests the total throughput can be several times higher than llama.cpp. On top of that you get excellent multi-GPU support (tensor parallelism) and support for AWQ, GPTQ and FP8.
Cons: the model has to fit entirely in VRAM, and by default vLLM grabs almost all of the card's memory at startup. It also starts more slowly and is less comfortable on older consumer cards.
Which one to choose?
- Just starting out or simply want to chat: Ollama + Open WebUI.
- Not enough VRAM and you want to squeeze out the maximum: llama.cpp. Offloading layers and MoE experts to RAM lets you run models that would be unusable in Ollama.
- A server for several people, agents, automation: vLLM, as long as the model fits entirely in VRAM.
Nothing stops you from using several at once. They all speak the same API, so Open WebUI or your own scripts can use any of them after changing the address.
FAQ
Is Ollama the same thing as llama.cpp?
Ollama uses llama.cpp to run models and adds model management, automatic configuration and its own API on top.
Does vLLM make sense for a single user?
Rarely. For single requests the speed is close to llama.cpp, while vLLM needs more VRAM and more configuration.
Can I run several servers at the same time?
Yes. Each exposes an OpenAI-compatible API on its own port, and Open WebUI can connect to several at once.


