Ollama vs llama.cpp
Last verified 2026-10-17. Both tools are assessed against the same low-spec brief — check each page for whether the figures are hands-on or vendor claims.
These are not competing engines. Ollama embeds a llama.cpp-derived runtime and adds model management, a daemon, and a REST API. So the honest question is not "which is faster" but "which shape do you want".
Pick Ollama if
- You want one command per model:
ollama run qwen3:4band it works. - Something else on the network needs an API. Ollama listens on
:11434and speaks both its own API and an OpenAI-compatible one, which is what Open WebUI and most editors expect. - You would rather not manage GGUF files by hand.
The cost is a background daemon that keeps models in memory by default for five minutes. On a small machine that is exactly the memory you were trying to protect, so set OLLAMA_KEEP_ALIVE=0 or a short duration and let it unload.
Pick llama.cpp if
- You want a single process you start when you need it and kill when you are done.
- You are tuning something specific: thread count, context size, batch size, a particular quantisation.
- You are scripting a batch job rather than serving chat requests.
llama-server is a small HTTP server with an OpenAI-compatible endpoint, so "llama.cpp can't be an API" is not true — it just does not manage models for you.
The memory number that decides it
Both run the same weights at the same quantisation, so the model memory is identical. The difference is everything around it:
| Ollama | llama.cpp | |
|---|---|---|
| Idle footprint | daemon + loaded model held for 5 min | zero when stopped |
| Model handling | pulled and managed | GGUF file you point at |
| Config surface | environment variables | flags per invocation |
| Default audience | applications | operators |
On a 4 GB box the 5-minute keep-alive is the thing that bites. On an 8 GB box with other services running, Ollama's convenience is worth more than the memory it holds.
Verdict
Install Ollama unless you have a reason not to. Install llama.cpp when the reason arrives — usually the day you need the memory back or need to run the same prompt across forty files without a daemon in the way. They can coexist: same GGUF files, different front doors.
Side by side
| Field | Ollama | llama.cpp |
|---|---|---|
| Licence | MIT | MIT |
| Price | Free | Free |
| Pricing model | Open source, no paid tier | Open source, no paid tier |
| Minimum RAM | 8 GB | 2 GB |
| GPU needed | Optional | Optional |
| Docker image | Yes | Yes |
| Platforms | Linux, macOS, Windows, Docker | Linux, macOS, Windows, Docker |
Read the full pages: Ollama · llama.cpp