vLLM vs Ollama: how to choose
vLLM and Ollama both run open-weight language models and are built for different jobs. Ollama optimises for one person getting a model running on their own machine in a minute. vLLM optimises for serving many concurrent requests on GPUs at the highest throughput the hardware allows.
Ollama's design goals show everywhere: a single binary, a model registry with one-command pulls, quantised weights by default, and it runs acceptably on a laptop using CPU or Apple Silicon. It is the right tool for local development, prototyping, and privacy-sensitive single-user workloads.
vLLM is server software. It assumes GPUs and expects concurrency, using continuous batching and paged attention to keep the accelerator busy across many simultaneous requests. On a single request it may not feel dramatically faster; under real concurrent load the difference in tokens per second per GPU is large, and that is the entire point.
Decision matrix: which one fits your situation
| Your situation | Use | Why |
|---|---|---|
| Local development on a laptop | Ollama | Runs on CPU or Apple Silicon, pulls quantised models in one command, no GPU required. |
| Production API serving many users | vLLM | Continuous batching and paged attention keep GPU utilisation high under concurrency. |
| One user, occasional queries, own hardware | Ollama | Throughput is irrelevant at concurrency of one; convenience dominates. |
| Cost per token on rented GPUs matters | vLLM | Higher throughput per GPU-hour is the whole economic argument. |
| Air-gapped internal assistant for a team | vLLM | Concurrency and an OpenAI-compatible endpoint suit multi-user internal deployment. |
| Evaluating many models quickly | Ollama | Pulling and swapping models is far quicker; move the winner to vLLM. |
Quantisation is the hidden difference
Ollama defaults to quantised weights, which is why a model that nominally needs far more memory runs on a laptop at all. That is a deliberate quality-for-accessibility trade, and for most local work it is invisible. vLLM more commonly serves higher-precision weights and supports quantisation as a deliberate choice rather than a default.
This matters when benchmarking. Comparing a quantised local model against a full-precision served one and concluding something about the serving stack is a category error — you measured the weights, not the server. Fix precision on both sides before drawing conclusions.
Frequently asked questions
Can I use Ollama in production?
For low-concurrency internal tools, yes, and plenty of teams do. It becomes the wrong choice as soon as requests arrive concurrently. Ollama can batch parallel requests via `OLLAMA_NUM_PARALLEL`, but it defaults to 1 and each slot statically reserves its own context window, so memory scales linearly with concurrency. Without vLLM's PagedAttention and dynamic KV-cache scheduling, GPU utilisation collapses and cost per token rises sharply. If you are renting GPUs and serving more than a handful of simultaneous users, the throughput difference is the entire budget.
Do both expose an OpenAI-compatible API?
Yes, and this is genuinely useful — it means the same client code can talk to a laptop during development and a served endpoint in production. Compatibility is not total, particularly around newer parameters and streaming details, so verify the specific fields your client depends on rather than assuming a drop-in swap.
What hardware does vLLM require?
Practically, a GPU with enough memory for the model plus its KV cache; the cache grows with concurrency and context length and is frequently the real constraint rather than the weights. Plan capacity from concurrent sequences and maximum context, not from parameter count alone. vLLM can run on CPU but doing so gives up the advantage it exists to provide.
Should I use one for development and the other for production?
That is a sound pattern and a common one: Ollama on developer machines for fast iteration, vLLM for the served environment, with an OpenAI-compatible client in between so application code does not change. Keep the model and precision identical across both, or you will chase behaviour differences that have nothing to do with your code.