Comparison, 2026
vLLM vs Ollama. Pick by your users and your memory.
Most comparisons benchmark both on an 80 GB data-centre card you won’t rent. This one starts from what you’ll actually run: your model, your users, your server.
NVIDIA L4, 24 GB
Forge L4 = one 2 GB slice, 8% of the card’s memory, yours alone. Processing is shared in turns.
NVIDIA L40S, 48 GB
Forge L40S = one 8 GB slice, 17% of the card’s memory, yours alone. Processing is shared in turns.
The short answer
Run Ollama if one person or a few use the model, or if you have no GPU. It installs with one command, runs on a CPU, and serves an OpenAI-compatible API. Run vLLM when many requests arrive at the same moment: it batches them on the GPU, where Ollama answers one at a time by default.
Either way, the model must fit in memory. On a CPU server that’s RAM; on a GPU it’s VRAM. An 8B model at 4-bit needs about 4 to 5 GB plus room for context.
Search “vLLM vs Ollama” and you’ll find big throughput charts, almost all from one H100 or A100. Some compare a 4-bit model in Ollama against a 16-bit one in vLLM, which says more about the models than the tools.
Several also quote defaults that have since changed. Ollama’s current docs set OLLAMA_NUM_PARALLEL to 1, not 4.
So we went back to both projects’ own documentation, current versions (vLLM 0.32, Ollama 0.40), and asked the question that decides it on a real server: how many people send requests at once, and how much memory do you have?
In this guide you’ll learn
- The short verdict, in one table
- A picker: three questions, the tool and the server
- Why concurrency decides it, without borrowed benchmarks
- What fits on a CPU server, a 2 GB and an 8 GB GPU slice
- Both setups, with the API kept private
- Moving from Ollama to vLLM without changing your app
Chapter 1
The short answer
Both are free, open source and serve the same open models. They’re built for different loads.
| Ollama | vLLM | |
|---|---|---|
| Built for | Running models easily on one machine | Serving many requests from a GPU |
| Requests at once (default) | One per model (OLLAMA_NUM_PARALLEL=1), up to 512 queued | Continuous batching: new requests join the running batch |
| Runs without a GPU | Yes, on the CPU | A CPU backend exists; its docs call it basic |
| NVIDIA GPUs | Compute capability 5.0 and newer | Compute capability 7.5 and newer (T4, L4, A100, H100) |
| Model files | GGUF and Safetensors, from its own library or imported | Hugging Face models; GPTQ, AWQ, FP8, GGUF and more |
| API | Its own, plus an OpenAI-compatible subset on /v1 | OpenAI-compatible server, plus Anthropic Messages and gRPC |
| Listens on | 127.0.0.1:11434 by default | Whatever --host and --port you give it |
| Install | One shell command | pip or Docker, Python 3.11 to 3.14, Linux |
| Licence | MIT | Apache 2.0 |
Both serve an OpenAI-style API, so your app doesn’t care which one is behind it. Start with Ollama, and switch when the queue tells you to.
Chapter 2
Which one should you run?
Answer for the model you want to run and the people or apps that will call it.
Our answer
Ollama, on a Forge L40S.
- Ollama is one install command and one pull per model, with an OpenAI-compatible API on port 11434. For one person or a few, its speed is the GPU’s speed.
- An 8B model at 4-bit needs about 4 to 5 GB plus context, so it needs the 8 GB Forge L40S slice.
Sizes are model weights at 4-bit plus room for context. How to set up Ollama
Run it on a Forge L40S: billed by the hour, so you can test your model for the price of an hour. Deploy a Forge L40S
Chapter 3
Why the number of users decides it
For one person typing into a chat, both tools are limited by the same thing: how fast the hardware reads the model. The difference shows when requests overlap.
- Ollama queues. By default it answers one request per model at a time and holds up to 512 more in a queue. Raise
OLLAMA_NUM_PARALLELto run several together, but memory grows with it: Ollama reserves context for every parallel slot. - vLLM batches. Requests join the running batch as they arrive, and its PagedAttention keeps each conversation’s cache in small blocks of GPU memory, so many fit side by side. More users share the GPU’s work instead of waiting for it.
- The cost of vLLM: by default it claims most of the GPU’s memory up front for that cache, it needs a GPU to shine, and it takes more setup.
MythvLLM is always faster.
For one user it mostly isn’t the point: both are bound by the GPU. vLLM’s lead is in total throughput when many requests overlap.
MythOllama can’t handle more than one request.
It can; it just doesn’t by default. Set OLLAMA_NUM_PARALLEL and give it the memory for each slot.
MythYou need a GPU to run a language model.
Not for small ones. Ollama runs GGUF models on a CPU; answers come slower, which is fine for one person or a background job.
Chapter 4
What fits on a CPU server and on a GPU slice
No tool makes a model fit in memory it doesn’t have. At 4-bit, a model needs roughly half a gigabyte per billion parameters, plus room for context.
| Model | Weights at 4-bit | Lite (CPU, RAM) | Forge L4 (2 GB VRAM) | Forge L40S (8 GB VRAM) |
|---|---|---|---|---|
| 1B to 1.5B | About 1 GB | Lite 2 and up | Fits | Fits, room for vLLM |
| 3B to 4B | About 2 GB | Lite 6 and up | No room for context | Fits |
| 7B to 8B | About 4 to 5 GB | Lite 8 and up | No | Fits |
| 13B | About 7 to 8 GB | Lite 16 | No | No room for context |
| 70B | About 40 GB | No | No | No |
Inside a GPU slice, slightly less memory is usable than the slice size, as NVIDIA notes for virtual GPUs. Leave headroom: give vLLM a --gpu-memory-utilization below its default, and check real usage with nvidia-smi. Our VRAM calculator works out a model’s needs in detail.
Chapter 5
No GPU? Ollama on a CPU server
For a private assistant, a coding helper or a batch job that runs overnight, a CPU server is often enough.
- Use Ollama. It runs GGUF models on the CPU with no extra setup. vLLM’s CPU backend exists, but its own docs call it basic.
- Size the RAM, not the CPU first. The model has to fit in memory with the system beside it: a Lite 6 for 3B models, a Lite 8 for 8B.
- Keep it to one or two users. On a CPU, every extra request slows the others down.
Chapter 6
Setting up both, with the API kept private
Both serve an API with no login by default. Keep it on 127.0.0.1 and reach it through SSH, or put a proxy with a password in front.
Ollama
Install and pull a model
curl -fsSL https://ollama.com/install.sh | sh ollama pull llama3.1:8b ollama run llama3.1:8b "Say hello in five words"
Allow a few requests at once (optional)
sudo systemctl edit ollama # add under [Service]: Environment="OLLAMA_NUM_PARALLEL=2" sudo systemctl restart ollama
Leave
OLLAMA_HOSTalone: the default keeps the API on 127.0.0.1:11434, private to the server.Use it from your laptop
ssh -N -L 11434:127.0.0.1:11434 root@your-server-ip
Your laptop now reaches the API at
http://localhost:11434/v1. OpenAI clients need an API key; Ollama ignores it, so any text works.
vLLM
Install in its own environment
sudo apt install -y python3-venv python3 -m venv ~/vllm && . ~/vllm/bin/activate pip install vllm
vLLM needs Linux, Python 3.11 to 3.14 and an NVIDIA GPU with compute capability 7.5 or newer; the L4 and L40S both qualify. Check your Python with
python3 --versionfirst.Serve a model, privately, with a key
vllm serve Qwen/Qwen2.5-1.5B-Instruct \ --host 127.0.0.1 --port 8000 \ --api-key "$(openssl rand -hex 16)" \ --gpu-memory-utilization 0.85 \ --max-model-len 4096
Print and save the key before you start, or set it from a file. A shorter
--max-model-lenleaves more memory for users at once.Use it from your laptop
ssh -N -L 8000:127.0.0.1:8000 root@your-server-ip
Point your OpenAI client at
http://localhost:8000/v1with the key.
The full vLLM walkthrough, with a command builder for your GPU memory, is in our vLLM setup tutorial. New to servers? Our SSH key tutorial and SSH hardening guide cover the connection, and the VPS security guide the firewall.
Chapter 7
Moving from Ollama to vLLM
Start simple and switch when users start waiting. Because both speak the OpenAI API, the app mostly stays the same.
Watch for the queue
Requests that wait for others to finish are the sign. Raising
OLLAMA_NUM_PARALLELhelps until memory runs out.Pick the same model on Hugging Face
Ollama names models its own way (
llama3.1:8b); vLLM loads them from Hugging Face. Choose a 4-bit AWQ or GPTQ build to stay inside the same memory.Change the base URL and the model name
Port 11434 becomes 8000, and the model name becomes the Hugging Face name. Test one request, then move the traffic.
Now it’s your move
For one person, a few people or a CPU server, Ollama is the easy right answer. When many requests land at once on a GPU, vLLM earns its extra setup. Either way, size the memory first.
Ready to try your model? Deploy a Forge L40S for a GPU, or a Lite 8 for a CPU server, and pay only for the hours you test.