vLLM vs Ollama vs llama.cpp: which is faster depends on how many people ask
In Red Hat's published test vLLM peaked at 793 tokens a second and Ollama at 41 on the same GPU, but that was with up to 256 users at once. Single-user speed and many-user throughput are different questions. What each engine is, what Ollama runs underneath in 2026, and a decision tree for picking one.
On one NVIDIA A100 with Llama 3.1 8B, vLLM reached a peak of 793 output tokens per second and Ollama 41. That’s from a published Red Hat Developer benchmark, and it gets quoted a lot. The detail that usually gets left out: the test ramped from 1 to 256 concurrent users. So “which one is faster” really means “faster for whom”. If one person is asking, you want the most tokens per second for that one person. If a crowd is asking, you want the most tokens per second in total. Those are two different questions, and the three engines answer them differently.
This post covers what each engine is, why batching changes the answer, what Ollama actually runs underneath today, and a short decision tree at the end. No benchmarks were run for it: every number comes from the projects’ own docs, the vLLM paper, or Red Hat’s published test, and the source is linked next to each one.
The kitchen: a stove, a meal kit, a restaurant line
| llama.cpp | Ollama | vLLM | |
|---|---|---|---|
| What it is | C/C++ inference engine on the ggml library | Convenience layer: model pulls, a local API, a desktop app | GPU serving engine for many concurrent users |
| Kitchen role | the stove | a meal kit that brings its own stove | a restaurant line |
| Runs on | CPU, Apple Metal, CUDA, Vulkan, HIP, SYCL and more (build docs) | macOS, Windows, Linux; MLX on Apple silicon | Linux; NVIDIA compute capability 7.5+, AMD, Intel, plugins (install docs) |
| Main model format | GGUF | GGUF (via llama.cpp), safetensors (MLX) | safetensors: FP16/BF16, AWQ, GPTQ, FP8, NVFP4… |
| Concurrency default | --parallel auto, continuous batching on |
OLLAMA_NUM_PARALLEL = 1 |
continuous batching + PagedAttention |
| OpenAI-compatible API | yes (llama serve) |
yes (/v1 on port 11434) |
yes (vllm serve) |
llama.cpp is “LLM inference in C/C++” (README). On 13 November 2026 its libraries reached v1.0.0, with “more than 150 architecture variants” supported. It loads GGUF files and runs almost anywhere, from a laptop CPU to a multi-GPU box.
Ollama is the one-command experience: ollama pull, ollama run, and an API waiting on localhost:11434 (including an OpenAI-compatible /v1 since February 2024). A small twist: on GitHub the meal kit is more popular than the stove, at about 187,000 stars against llama.cpp’s 135,000 and vLLM’s 97,000 (GitHub API, 17 November 2026).
vLLM came out of UC Berkeley’s Sky Computing Lab (README) and the PagedAttention paper (Kwon et al., SOSP 2023). It’s built for Linux servers with GPUs, and its whole job is serving many requests at once.
What’s inside Ollama in 2026
“Ollama is a wrapper around llama.cpp” was true for a long time, and it’s partly true again, but the story has some turns. Here it is in Ollama’s own words:
| Date | What changed | Source |
|---|---|---|
| 2023 | “Ollama has so far relied on the ggml-org/llama.cpp project for model support” | blog, 15 May 2025 |
| May 2025 | A new engine for multimodal models, calling GGML “directly from Go” | same post |
| Mar 2026 | Ollama on Apple silicon “built on top of Apple’s machine learning framework, MLX” (0.19 preview) | blog, 30 Mar 2026 |
| Jun 2026 | Ollama 0.30: “GGUF model compatibility through llama.cpp. This augments Ollama’s MLX engine on Apple silicon” | blog, 5 Jun 2026 |
| Nov 2026 | The repo pins one exact llama.cpp build (LLAMA_CPP_VERSION = b12257); release v0.40.16 lists “Updated llama.cpp” |
github.com/ollama/ollama |
So the meal kit really does carry the stove for GGUF models, and on a Mac it carries a second one (MLX, for safetensors models, on by default on macOS arm64 per the developer guide).
One person asking: a memory race
When one person is waiting for an answer, every new token means streaming the model’s weights through the chip again. The vLLM paper says the same thing: generation “makes the workload memory-bound, underutilizing the computation power of GPUs”. That’s why, for a single user, memory bandwidth predicts speed better than compute does. llama.cpp’s Apple silicon results (LLaMA 7B, Q4_0, llama-bench, a November 2023 build) show it:
| Chip | Memory bandwidth | Text generation |
|---|---|---|
| M1 (8 GPU cores) | 68 GB/s | 14.15 tokens/s |
| M3 Max (40 cores) | 400 GB/s | 66.31 tokens/s |
| M4 Max (40 cores) | 546 GB/s | 83.06 tokens/s |
| M2 Ultra (76 cores) | 800 GB/s | 94.27 tokens/s |
About 12× the bandwidth gets you about 7× the speed. For one person, any of the three engines is limited by the same thing, and what matters most is how well the model fits in fast memory, which is why llama.cpp’s and Ollama’s 4-bit GGUF files are so popular on laptops.
A crowd asking: batching
The way out of a memory race is to share each trip through the weights. If 32 requests are in the batch, one pass over the weights produces a token for all 32 of them. llama.cpp’s own batched-bench README publishes sample results that show the trade clearly:
From 1 to 32 parallel streams the total goes from 41.6 to 465.4 tokens a second, 11× more, while each stream drops to about 14.5. Throughput for everyone and speed for one person are different numbers, and an engine built for a crowd optimises the first one.
Two ideas make vLLM good at it:
- Continuous batching. After every single decoding step, finished requests leave the batch and new ones join, so a new request waits one step, not a whole batch. vLLM didn’t invent this: it comes from Orca (OSDI 2022), which “schedules execution at the granularity of iteration (instead of request)”. llama.cpp’s server has it too:
--cont-batchingis “enabled” by default (server README). - PagedAttention. Each request’s KV cache (its memory of the conversation, see our KV cache explainer) used to be one contiguous block reserved for the longest possible answer. The paper found that “only 20.4% - 38.2% of the KV cache memory is used to store the actual token states” in those systems. vLLM hands out the cache in blocks (the default is 16 tokens) as a request grows, like pages in virtual memory:
More requests fit in the same GPU memory, so the batch gets bigger. The paper reports 2–4× the throughput of FasterTransformer and Orca “with the same level of latency”.
The published head-to-head
Red Hat’s test (Harshith Umesh, August 2025) is useful because it states its setup:
| Hardware | 1× NVIDIA A100-PCIE-40GB |
| Models | Llama 3.1 8B Instruct (vLLM) and llama3.1:8b-instruct-fp16 (Ollama), both 16-bit |
| Versions | vLLM 0.9.1, Ollama 0.9.2, GuideLLM 0.2.1 |
| Load | 1 to 256 concurrent users, 300 s per run |
| Peak output throughput | vLLM 793 tokens/s, Ollama 41 tokens/s |
| P99 latency at peak | vLLM 80 ms, Ollama 673 ms |
With default settings (four parallel requests in that Ollama version), vLLM’s throughput “scaled impressively as concurrency increased” and Ollama’s stayed flat. Tuned to OLLAMA_NUM_PARALLEL=32, Ollama still plateaued and its inter-token latency became “extremely erratic”. There’s one more interesting detail: with defaults, Ollama’s time between tokens stayed low and steady under heavy load, because “Ollama throttles requests”: a few people are served quickly while everyone else waits in a queue, so time to first token “rose dramatically”. The article doesn’t publish single-user numbers, so it doesn’t tell you which is faster for one person; its own conclusion is Ollama for local development and vLLM for production serving.
The setting worth knowing
Today’s Ollama FAQ lists OLLAMA_NUM_PARALLEL as “the maximum number of parallel requests each model will process at the same time, default 1”. Everyone else waits in a queue of up to 512 (OLLAMA_MAX_QUEUE), and after that Ollama answers with a 503. If a few people share one Ollama box, raise it, and plan memory for it: “Required RAM will scale by OLLAMA_NUM_PARALLEL * OLLAMA_CONTEXT_LENGTH” (the default context is 4,096 tokens).
Ingredients: quantization formats
- GGUF (llama.cpp, Ollama): one file with weights, tokenizer and chat template, k-quants like
Q4_K_M. Covered in detail in GGUF explained. - AWQ, GPTQ, FP8, NVFP4 (vLLM): the formats its GPU kernels are built for (quantization docs). vLLM can load GGUF, but its own docs call that support “highly experimental and under-optimized”, and it now lives in a separate plugin.
- vLLM also takes the GPU’s free memory for its KV cache by default (optimization docs), so it expects to have the GPU to itself unless you set
gpu_memory_utilization.
The good news is that all three speak the OpenAI API, so switching engines is mostly a matter of changing the base URL in your client.
The decision tree
- How many people ask at once?
- Just you, on a laptop, a CPU or a Mac: llama.cpp if you like control and flags, Ollama if you like one command. Both load the same GGUF files, and Ollama runs llama.cpp for them anyway.
- A few people sharing one dev box: Ollama is fine; raise
OLLAMA_NUM_PARALLELand budget the memory. - An API serving many users on a GPU server: vLLM. Batching plus paged KV cache is what turns 41 into 793.
Which one do you run local models with today? The video for this post asks the same question in the comments.