Skip to content
Black FridayCode BLACK150: 150% on your first deposit of $100 or more, up to $500 bonus. New accounts, until 1 Dec, 00:00 UTC.Get the code
LiteKeep
Sign inDeploy a server

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.

  • 11 min read
  • 7 chapters
  • Updated

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.

vLLM vs Ollama, from each project's documentation (vLLM 0.32, Ollama 0.40)
OllamavLLM
Built forRunning models easily on one machineServing many requests from a GPU
Requests at once (default)One per model (OLLAMA_NUM_PARALLEL=1), up to 512 queuedContinuous batching: new requests join the running batch
Runs without a GPUYes, on the CPUA CPU backend exists; its docs call it basic
NVIDIA GPUsCompute capability 5.0 and newerCompute capability 7.5 and newer (T4, L4, A100, H100)
Model filesGGUF and Safetensors, from its own library or importedHugging Face models; GPTQ, AWQ, FP8, GGUF and more
APIIts own, plus an OpenAI-compatible subset on /v1OpenAI-compatible server, plus Anthropic Messages and gRPC
Listens on127.0.0.1:11434 by defaultWhatever --host and --port you give it
InstallOne shell commandpip or Docker, Python 3.11 to 3.14, Linux
LicenceMITApache 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.

Your model and your users

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_PARALLEL to 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.

Fact

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.

Fact

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.

Fact

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 against our servers (context and the system need extra room)
ModelWeights at 4-bitLite (CPU, RAM)Forge L4 (2 GB VRAM)Forge L40S (8 GB VRAM)
1B to 1.5BAbout 1 GBLite 2 and upFitsFits, room for vLLM
3B to 4BAbout 2 GBLite 6 and upNo room for contextFits
7B to 8BAbout 4 to 5 GBLite 8 and upNoFits
13BAbout 7 to 8 GBLite 16NoNo room for context
70BAbout 40 GBNoNoNo

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

  1. 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"
  2. 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_HOST alone: the default keeps the API on 127.0.0.1:11434, private to the server.

  3. 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

  1. 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 --version first.

  2. 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-len leaves more memory for users at once.

  3. 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/v1 with 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.

  1. Watch for the queue

    Requests that wait for others to finish are the sign. Raising OLLAMA_NUM_PARALLEL helps until memory runs out.

  2. 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.

  3. 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.