vLLM vs Ollama: Which to Use, and How to Install and Run vLLM
vLLM vs Ollama comes down to one question: is the model for you on your own computer, or for many people at once on a server?
The short version: use Ollama for one person on Windows, Mac or Linux: one installer, GGUF models, and it still runs when there is no GPU. Use vLLM to serve many users at once from a Linux GPU server: it batches requests continuously and manages memory with PagedAttention, and it speaks the OpenAI API on port 8000. vLLM doesn’t run natively on Windows (use WSL or Docker) and needs an NVIDIA GPU with compute capability 7.5 or newer, such as an RTX 20-series card or better; AMD, Intel and Apple silicon have their own builds.
The surprise: vLLM is meant to take nearly all of your GPU memory. Left unset, it now sizes itself to the whole card, not the 90% older guides quote, so a second program on the same GPU runs out of room.
Jake’s six counter staff all started asking the shop’s parts chatbot questions at opening time. On Ollama, one answer arrived at a time while everyone else waited.
Jake: "Do we need a bigger computer?"
Ethan: "Not yet. Ollama answers one question at a time by default. vLLM answers them together on the same card."
vLLM vs Ollama at a glance
| Ollama | vLLM | |
|---|---|---|
| Built for | One person on their own computer | Many users at once on a server |
| Operating systems | Windows, Mac, Linux | Linux (Windows through WSL or Docker; Mac through vLLM-Metal) |
| Hardware | NVIDIA, AMD, Apple silicon, or CPU only | NVIDIA (compute capability 7.5+), AMD, Intel GPUs; CPU possible but not its strength |
| Models | GGUF models from its own library | Hugging Face models by name; AWQ, GPTQ, FP8, GGUF and more |
| Install | One installer | Python package or Docker image |
| API and port | Own API plus OpenAI-compatible /v1, port 11434 | OpenAI-compatible /v1 and Anthropic Messages API, port 8000 |
| Many requests at once | One at a time per model by default (OLLAMA_NUM_PARALLEL) | Continuous batching: designed for it |
| GPU memory | Uses what the model and context need | Takes most of the card for its cache, by design |
Neither is “better”. They solve different problems, which is why plenty of people use both: Ollama on the laptop, vLLM on the team’s GPU server.
When Ollama is the right choice
- You are the only user, or one of a few who rarely ask at the same moment.
- You are on Windows or a Mac and want it working in five minutes.
- Your computer has a modest GPU, or none: Ollama falls back to the CPU.
- You want to switch between many small models quickly with
ollama pullandollama run.
If several people do share one Ollama server, you can raise OLLAMA_NUM_PARALLEL. More parallel requests need more memory, and anything over the limit waits in a queue, up to 512 requests by default (see the Ollama FAQ). Our Ollama API guide covers the endpoints.
When vLLM is the right choice
- Several users or an app send requests at the same time, and waiting in a queue is not acceptable.
- You have a Linux machine with a supported GPU, or a cloud GPU instance.
- You want to serve a model straight from Hugging Face, in full precision or a GPU-friendly quantization such as AWQ, GPTQ or FP8.
- You need an OpenAI-compatible endpoint that existing apps can point at without code changes.
vLLM gets its speed from two ideas listed on the vLLM project page: continuous batching, which adds new requests to the work already running instead of waiting for a batch to finish, and PagedAttention, which stores each conversation’s memory in small blocks so the GPU wastes almost none of it.
Jake: "So vLLM shares the card between all six of them?"
Ethan: "Exactly. It keeps adding new questions to the work already running, instead of making each one wait its turn."
Install vLLM on Linux
The vLLM GPU installation guide lists the requirements: Linux, Python 3.11 to 3.14, and for NVIDIA a GPU with compute capability 7.5 or higher (T4, RTX 20-series, A100, L4, H100 and newer). Using the uv package manager:
uv venv --python 3.12 --seed
source .venv/bin/activate
uv pip install vllm --torch-backend=auto
vllm download-kernels # precompiled attention kernels for your CUDA version
--torch-backend=auto picks the PyTorch build that matches your driver. If torch.cuda.is_available() says False afterwards, the driver is the usual suspect: see CUDA not available.
Run vLLM as an OpenAI-compatible server
One command downloads the model from Hugging Face and starts the server on http://localhost:8000. The vLLM quickstart uses a small Qwen model, which is a good first test:
vllm serve Qwen/Qwen2.5-1.5B-Instruct
curl http://localhost:8000/v1/models
curl http://localhost:8000/v1/chat/completions -H "Content-Type: application/json" -d '{
"model": "Qwen/Qwen2.5-1.5B-Instruct",
"messages": [{"role": "user", "content": "Is the screen for a 2021 tablet in stock?"}]
}'
| Option | What it does | When to use it |
|---|---|---|
--host 0.0.0.0 --port 8080 | Listen on every network interface, on another port | Other machines on your network need to reach it |
--api-key KEY or VLLM_API_KEY | Require a bearer token; several keys are allowed | Anything reachable beyond your own machine |
--max-model-len 8192 | Caps the context length | Out of memory at startup, or you never need long prompts |
--tensor-parallel-size 2 | Splits the model across GPUs | The model doesn’t fit on one card |
--gpu-memory-utilization 0.5 | Caps vLLM’s share of the card | Another program shares the GPU |
Each vllm serve process hosts one model. For a second model, start another process on another port, or on another GPU.
The same code talks to both
Because both speak the OpenAI API, switching is a one-line change in your app. Only the base URL and model name differ:
from openai import OpenAI
# Ollama on your laptop
client = OpenAI(base_url="http://localhost:11434/v1", api_key="ollama")
# vLLM on the server (the key is whatever you passed to --api-key)
# client = OpenAI(base_url="http://gpu-server:8000/v1", api_key="YOUR_KEY")
reply = client.chat.completions.create(
model="MODEL_NAME",
messages=[{"role": "user", "content": "Do we stock the 2021 tablet screen?"}])
print(reply.choices[0].message.content)
That makes a sensible path: build on Ollama on your own machine, then point the same code at vLLM when real users arrive.
Jake: "So the app doesn’t change?"
Ethan: "One line. The address. Everything else stays as you wrote it."
vLLM’s GPU memory surprise
vLLM’s gpu_memory_utilization setting decides how much of the card it claims for the model and its cache. In current vLLM it is unset by default, and then vLLM uses 1.0 with its extensible KV cache (the default on NVIDIA and AMD) or 0.92 otherwise. The setting is per vLLM instance, and vLLM’s own guidance is to leave it alone unless something else needs GPU memory that vLLM can’t measure.
- Another program on the same GPU (a desktop, Ollama, a second vLLM): set
--gpu-memory-utilization 0.5or whatever leaves room for it. - Two vLLM servers on one card: give each a share, such as 0.5 and 0.5.
- Out of memory at startup: lower
--max-model-lenfirst; a long maximum context reserves a lot of cache.
For the general picture of what fills VRAM, see CUDA out of memory, and check what fits on your card with the VRAM calculator.
vLLM on Windows, in Docker and on a Mac
Windows: vLLM doesn’t support Windows natively. Install it inside WSL with the NVIDIA driver installed on the Windows side only, or use Docker Desktop with WSL.
Docker: the vLLM Docker guide runs the official image with the model name after it. Mounting the Hugging Face cache keeps downloads between runs:
docker run --rm --gpus all \
-v ~/.cache/huggingface:/root/.cache/huggingface \
-v vllm-cache:/root/.cache/vllm \
-p 8000:8000 \
vllm/vllm-openai:latest \
Qwen/Qwen2.5-1.5B-Instruct
Mac: on Apple silicon, vLLM runs through vLLM-Metal, a community-maintained plugin that uses MLX and needs macOS Sonoma or later. It works with MLX-converted models. For one person on a Mac, Ollama or LM Studio is still the easier road; our local AI tool comparison covers those.
Jake’s decision
- One person, any computer: Ollama.
- A few people, occasional overlap: Ollama with
OLLAMA_NUM_PARALLELraised, if memory allows. - Many people or an app at the same time, Linux GPU server: vLLM.
- Build on Ollama, deploy on vLLM: the OpenAI-compatible API means only the base URL changes.
Jake: "And at opening time tomorrow?"
Ethan: "Six questions, six answers, all at once. The laptop keeps Ollama for testing."
Official references for this guide
- vLLM GPU installation: Linux and Python requirements, compute capability 7.5+, no native Windows support, and the AMD, Intel and Apple silicon builds.
- vLLM quickstart:
vllm serve, port 8000, the OpenAI-compatible endpoints and--api-key. - vLLM Docker deployment: the
vllm/vllm-openaiimage and cache mounts. - vLLM on GitHub (features, PagedAttention, continuous batching) and the Ollama FAQ (parallel requests and queue).
Frequently asked questions
What is the difference between vLLM and Ollama?
Ollama is built for one person running models on their own computer: an easy installer for Windows, Mac and Linux, GGUF models, and CPU fallback. vLLM is a serving engine for Linux GPU servers, built to answer many requests at once with continuous batching and PagedAttention.
Is vLLM faster than Ollama?
For many users at once on a GPU server, vLLM is built for much higher throughput, because it batches requests continuously. For one person chatting on a desktop, the difference is small and Ollama is far easier to run.
Can vLLM run on Windows?
Not natively. vLLM supports Linux only, so on Windows you run it inside WSL with the NVIDIA driver installed on Windows, or in Docker.
Can vLLM run on a Mac?
On Apple silicon, through vLLM-Metal, a community-maintained plugin that uses MLX and needs macOS Sonoma or later. For most Mac users, Ollama or LM Studio is simpler.
What GPU do I need for vLLM?
An NVIDIA GPU with compute capability 7.5 or higher, such as an RTX 20-series card, T4, A100, L4 or H100. AMD and Intel GPUs have their own vLLM builds.
How do I install vLLM?
On Linux with an NVIDIA GPU, create a Python 3.11 to 3.14 environment, run uv pip install vllm --torch-backend=auto, then vllm download-kernels.
What port does vLLM use?
vLLM's server listens on http://localhost:8000 by default. Change it with --host and --port. Ollama uses port 11434.
Is vLLM OpenAI compatible?
Yes. vllm serve starts an OpenAI-compatible API at /v1, so OpenAI client libraries work by changing the base URL. It also offers the Anthropic Messages API.
How do I add an API key to vLLM?
Start the server with --api-key YOUR_KEY or set VLLM_API_KEY. Clients then send it as a bearer token. You can pass several keys to rotate them.
Why does vLLM use all my GPU memory?
By design. When gpu_memory_utilization is unset, vLLM sizes its cache to use the GPU's memory (1.0 with the extensible KV cache, 0.92 otherwise). Set a lower value only when another program shares the GPU.
Can vLLM serve more than one model?
One vllm serve process hosts one model. Run a second process on another port, or another GPU, for a second model.
Can vLLM run GGUF models?
GGUF is in vLLM's list of supported quantization formats, but most vLLM users serve Hugging Face models in formats such as AWQ, GPTQ or FP8. Ollama and llama.cpp are built around GGUF.
How many parallel requests does Ollama handle?
By default Ollama processes one request at a time per model on NVIDIA and AMD GPUs, and queues the rest; set OLLAMA_NUM_PARALLEL to raise it, at the cost of more memory.
Can I use vLLM without a GPU?
vLLM has CPU support, but it is built for GPU servers. On a computer without a GPU, Ollama or llama.cpp is the practical choice.
How do I run vLLM in Docker?
Use the vllm/vllm-openai image with --gpus all, map port 8000, mount your Hugging Face cache, and pass the model name after the image name.
Should I switch from Ollama to vLLM?
Only if you serve several people at once from a Linux GPU server and throughput matters. For personal use on a laptop or desktop, stay with Ollama.
Revision note. Written November 27, 2026, against the current vLLM documentation and Ollama FAQ. “Horses for courses”: the right engine depends on who is asking, and how many at once.