vLLM vs Ollama: local model runner or production inference server
Both serve open-weight models behind an OpenAI-compatible API, but one is built to run models on your own machine and the other to serve many users from GPUs. Here is where the line falls.
- Type
- Comparison
- Last reviewed
- December 6, 2026
- Sources cited
- 13 sources ↓
What this covers
The short answer
vLLM and Ollama both download an open-weight model, load it onto your hardware and answer requests at an OpenAI-compatible endpoint, so a client written for one usually works with the other after a base-URL change. They were built for different jobs. Ollama is a model manager for one machine: it pulls models by name, picks settings for you, loads and unloads models as requests arrive, and runs on macOS, Windows and Linux. vLLM is a Python serving engine for Linux GPU servers: you point it at a Hugging Face checkpoint, it claims most of the GPU's memory, and it batches as many simultaneous requests as that memory allows.
- Choose Ollama when the model runs on a laptop, a desktop or a single workstation, when you switch between several models, or when you want an always-on local endpoint for an editor, a coding agent or your own scripts.
- Choose vLLM when many requests arrive at once (an internal tool for a team, a product feature, a public API), when the hardware is one or more datacenter-class GPUs on Linux, and when throughput per GPU and predictable latency under load are what you are measured on.
- Use both when you prototype on your own machine and deploy to a GPU server. Evaluate the model build you deploy, not the one on your laptop (see the last section).
vLLM and Ollama at a glance
| vLLM | Ollama | |
|---|---|---|
| Written in | Python, with C++/CUDA and Triton kernels | Go, with ggml-based and MLX engines |
| Built for | High-throughput serving to many users | Running models simply on your own machine |
| Operating systems | Linux; Windows only through WSL | macOS, Windows and Linux; official Docker image |
| Hardware | NVIDIA GPUs first (compute capability 7.5 or newer); also AMD, Intel, TPU and CPUs; Apple Silicon through the community vLLM-Metal plugin | NVIDIA and AMD GPUs, Apple Silicon, and CPUs; models that do not fit in VRAM are split between GPU and system memory |
| Getting a model | Any Hugging Face model ID or local checkpoint, downloaded on first vllm serve | ollama pull by name from the ollama.com library, hf.co/<user>/<repo> for GGUF files on Hugging Face, or a Modelfile |
| Model formats | Hugging Face checkpoints (safetensors), including FP8, AWQ, GPTQ and other quantized builds; GGUF only as an experimental plugin | GGUF files and its own library; Safetensors directories imported with a Modelfile |
| Models per server | One model per server process (plus LoRA adapters on it) | Several, loaded on request and unloaded when idle |
| Concurrency | Continuous batching over a paged KV cache (PagedAttention) | One request at a time per model by default on most backends; raise OLLAMA_NUM_PARALLEL |
| Multiple GPUs | Tensor, pipeline, data and expert parallelism, across nodes | Uses one GPU if the model fits, otherwise spreads it across the GPUs it has |
| Server | vllm serve, port 8000, OpenAI-compatible | Background service on port 11434, its own API plus OpenAI-compatible /v1 endpoints |
| License | Apache 2.0 | MIT |
Hardware support, defaults and supported models change from release to release in both projects. Check the vLLM installation docs and the Ollama docs for the version you plan to run.
Setup: one command versus a Python serving stack
Ollama installs as a desktop app on macOS and Windows or with an install script on Linux, then starts a background service. Running a model is one command, and the library decides which quantization each tag downloads:
ollama run llama3.2
ollama run hf.co/<user>/<repo>:Q4_K_MvLLM is a Python package with compiled GPU kernels. Its docs recommend a fresh virtual environment, since the wheels are built against specific CUDA and PyTorch versions, or the official vllm/vllm-openai Docker image. Serving a model is also one command once that environment works:
uv venv --python 3.12 --seed
source .venv/bin/activate
uv pip install vllm --torch-backend=auto
vllm serve Qwen/Qwen3-8B
# OpenAI base URL: http://localhost:8000/v1The difference shows up after the first command. Ollama is designed so you rarely touch it again. vLLM is designed to be configured: context length, memory share, parallelism, quantization, scheduling and caching are all flags you are expected to set for your hardware and traffic. Gated models on Hugging Face need an access token (HF_TOKEN) in either case.
How each one spends GPU memory
On startup vLLM claims a fixed share of GPU memory (--gpu-memory-utilization, 0.9 by default), loads the weights, and turns what is left into a pool of KV-cache blocks that PagedAttention hands out to requests as they grow. The model must fit on the GPUs you give it; vLLM is not built to spill layers into system RAM the way local runners do. If the model's full context window does not fit, lower it with --max-model-len. Our vLLM architecture and PagedAttention internals piece walks through the block tables and scheduler.
Ollama works out how many layers fit on the GPU and keeps the rest in system memory, so a model larger than your VRAM still runs, more slowly. ollama ps shows the split (for example 100% GPU or 48%/52% CPU/GPU). It sets a context length for you, which may be far shorter than the model supports; raise it with OLLAMA_CONTEXT_LENGTH or num_ctx and check the context length docs for your version's default. Ollama also unloads a model five minutes after its last request unless you change keep_alive.
In practice: vLLM wants a GPU it can treat as its own, and leaves little memory for anything else on it. Ollama shares the machine with your other work, and gives memory back when it is idle.
Concurrency: where the two really differ
Generating a token is usually limited by how fast the GPU reads the model's weights, so batching many requests into one forward pass serves them for little more than the cost of one. vLLM is built around this. Its scheduler keeps the batch full by admitting new requests as others finish, splits long prompts into chunks so they do not stall requests already generating, and reuses the KV cache of shared prompt prefixes such as a common system prompt.
Ollama's OLLAMA_NUM_PARALLEL sets how many requests one model processes at once. Its FAQ says that when it is unset, the MLX engine on Apple Silicon picks a conservative value from available memory and other backends default to 1, so a second request waits in a queue (up to OLLAMA_MAX_QUEUE, 512 by default) until the first finishes. Raising it helps, but each parallel slot adds its own share of context memory.
For one user, the speed gap between the two is often small and depends on the model, quantization and hardware. As simultaneous requests climb into the dozens, vLLM on a capable GPU is the engine designed for that load. Head-to-head benchmarks published online rarely hold the model build, context length and versions constant, so treat them as hints and measure your own traffic.
Models and quantization
The two mostly run different files. Ollama runs GGUF builds, usually 4-bit quantizations such as Q4_K_M, chosen so models fit on ordinary hardware. vLLM is fastest with formats that have optimized GPU kernels: 16-bit checkpoints, FP8 on recent NVIDIA and AMD GPUs, and 4-bit AWQ or GPTQ weights. Our GPTQ vs AWQ comparison covers how those two differ in accuracy and why both depend on fast kernels.
vLLM can load GGUF, but its docs call that support highly experimental and under-optimized. If you are moving a model from Ollama to vLLM, start from the original Hugging Face checkpoint or a published AWQ, GPTQ or FP8 build of it, not the GGUF file.
A vLLM server runs one base model, set when it starts. It can serve many LoRA adapters on top of that model in the same batch (--enable-lora), which suits teams that fine-tune one model for several tasks. Ollama is the easier tool for keeping a shelf of different models and switching between them.
Running in production
- Scaling out. vLLM splits large models across GPUs with
--tensor-parallel-sizeand--pipeline-parallel-size, and across nodes. Ollama spreads a model over several GPUs only when it does not fit on one, and is not built for multi-node serving. - Access control.
vllm serve --api-keymakes the server require a bearer token. Ollama's local server has no built-in authentication and listens on127.0.0.1:11434by default; if you expose it withOLLAMA_HOST, put it behind a proxy or firewall that controls who can reach it. - Monitoring. vLLM exposes Prometheus metrics at
/metrics(queue length, KV-cache use, token throughput), which is what autoscaling and alerting usually hang on. Check each project's docs for what your version reports. - Containers. Both ship official Docker images:
vllm/vllm-openaiandollama/ollama. GPU access in either needs the NVIDIA Container Toolkit (or the AMD equivalent).
Which to pick for your situation
| You want to | Start with | Why |
|---|---|---|
| Try a model on a Mac or Windows laptop | Ollama | Native apps for both; vLLM needs Linux, WSL or a community plugin on Apple Silicon |
| Back an editor plugin, coding agent or script on your own machine | Ollama | An always-on local service that loads models on demand, and many tools support it out of the box |
| Run a model larger than your GPU's memory | Ollama | It splits the model between GPU and system memory; vLLM expects the model to fit on the GPUs |
| Serve a team or an application from one GPU server | vLLM | Continuous batching keeps many simultaneous requests moving instead of queuing them |
| Serve a public API or a product feature | vLLM | Throughput per GPU, multi-GPU parallelism, API keys and Prometheus metrics |
| Serve one base model with many fine-tunes | vLLM | Many LoRA adapters on one base model in the same server |
| Keep several different models ready on one box | Ollama | Loads models when requested and unloads idle ones |
| Shave latency for a single stream | Either; measure | For one user the gap is small; speculative decoding can matter more than the engine |
If you are weighing Ollama against the engine it grew out of, see Ollama vs llama.cpp. For a desktop app instead of a service, see LM Studio vs Ollama, and for vLLM against a local engine you configure yourself, see vLLM vs llama.cpp.
How to compare them on your hardware
Use the model, prompt lengths and concurrency you expect in production, and record time to first token, time per output token, total output tokens per second and peak memory at several concurrency levels (for example 1, 4, 16 and 64 simultaneous requests). Raise Ollama's OLLAMA_NUM_PARALLEL and context length first, or the test measures its defaults rather than its engine.
vLLM ships a load generator that can drive any OpenAI-compatible server, so the same request pattern can hit both:
vllm serve <model>
vllm bench serve --model <model> \
--dataset-name random \
--random-input-len 1024 --random-output-len 256 \
--request-rate 8 --num-prompts 200
OLLAMA_NUM_PARALLEL=8 OLLAMA_CONTEXT_LENGTH=8192 ollama serve
ollama run --verbose <model>Remember that the two are probably running different builds of the model: a 4-bit GGUF in Ollama and a 16-bit, FP8 or AWQ checkpoint in vLLM. Their answers will not match token for token, and speed differences partly reflect the format. Run your evaluation set against the exact build you deploy. If single-stream latency matters most, read our speculative decoding piece before changing engines. Flags change between releases; check vllm bench serve --help and the Ollama FAQ for your version.
Sources
- vLLM documentation
- vLLM docs: GPU installation and requirements
- vLLM docs: OpenAI-compatible server
- vLLM docs: engine arguments
- vLLM docs: GGUF quantization
- vLLM docs: vllm bench serve
- vLLM on GitHub
- Ollama documentation
- Ollama FAQ: concurrency, keep-alive, network access and KV cache
- Ollama docs: context length
- Ollama docs: importing a model
- Ollama on GitHub
- Efficient Memory Management for Large Language Model Serving with PagedAttention (SOSP 2023)