How-To

vLLM vs Ollama vs llama.cpp: Choosing a Self-Hosted LLM Inference Engine

Aseem Kishore
16 min read

The Back Room Tech is reader-supported. We may earn a commission when you buy through links on our site. Learn more.

Picking between vLLM, Ollama, and llama.cpp comes down to two questions: how many requests hit the server at once, and what hardware you already own. Treat it as a decision matrix. The useful distinction is deployment fit: model management, hardware support, and the serving controls your workload needs.

Quick verdict: Serving multiple users or apps at once from a Linux box with a capable NVIDIA or AMD GPU? Use vLLM. For single-user local inference with the least friction, use Ollama. For the lightest footprint and broadest hardware support, including CPU-only machines, use llama.cpp directly.

This guidance follows each project’s documented architecture and design goals — different serving and deployment priorities — not a head-to-head benchmark comparing the three.

Overview: What We’re Comparing

How this comparison was built: This article is based on official documentation and release notes. It isn’t based on hands-on benchmarking. You won’t find throughput numbers below, because no named, dated benchmark that controls for GPU, model, and quantization was available at write time.

All three engines are open source. All three run large language models (LLMs) on hardware you control instead of calling a hosted API. They just solve different parts of that problem.

EngineWhat it isBest forPrice (self-hosted)
vLLMHigh-throughput serving engine built around PagedAttention and continuous batchingShared inference API for a team or several appsNo software fee; infrastructure extra
OllamaModel-management and runtime layer; llama.cpp is among its supported backendsFast single-user setup and quick model swapping$0 locally; optional paid cloud tiers
llama.cppLightweight C/C++ inference runtime for GGUF-format modelsCPU-only boxes, modest GPUs, minimal dependenciesNo software fee; infrastructure extra
Original decision-matrix graphic created for this article (not an external capture) showing vLLM, Ollama, and llama.cpp as columns, with rows for concurrency handling, hardware floor, setup complexity, and best-fit use case

The Decision Matrix

This table is the core of the decision. Find the row that matches your situation.

FactorvLLMOllamallama.cpp
Concurrency handlingStrong. Continuous batching interleaves many simultaneous requestsCan serve several parallel requests, but not optimized for high-throughput multi-user serving the way vLLM isA lightweight API-server option; measure its concurrency behavior with your model and server configuration
Hardware floorMainstream serving paths target NVIDIA/AMD GPUs or TPUs (CPU-only builds exist but give up its main strengths); Linux primaryCPU-only or modest consumer GPUCPU-only or modest consumer GPU
Setup complexityHighest: Python env, glibc, CUDA/ROCm matchingLowest: pull-and-run workflowMedium: you manage model files and flags
Operational overheadHighest: driver and CUDA versions matterLowLow to medium
Typical use caseMulti-user API, production-style Linux deploymentPersonal chat, coding assistant, model experimentsHomelab with no GPU, edge boxes, custom builds

Here’s the same logic, framed as concurrency × hardware:

Single userMany concurrent users/apps
CPU-only or modest GPUOllama (easy) or llama.cpp (lean)Start with llama.cpp or Ollama for a simpler setup; evaluate a vLLM CPU build separately. Consider a GPU upgrade
Capable NVIDIA/AMD GPU on LinuxAny of the three. Ollama is the least workvLLM

Feature Comparison

FeaturevLLMOllamallama.cpp
Serving emphasisContinuous batching and PagedAttentionModel management with local API accessConfigurable inference with an OpenAI-compatible server
CPU-only operationCPU builds exist; check the selected backend installation requirementsYesYes
Primary platformLinuxLinux, macOS, Windows (per Ollama’s official download page)Linux, macOS, Windows
Apple SiliconVia the separate vLLM-Metal project (MLX backend, MLX-optimized models), not the standard vLLM installYesYes; Apple Silicon is a first-class backend
Quantized model focusNot its primary focusGGUF (via llama.cpp and Ollama’s own engine)GGUF
Model managementPulls from Hugging Face HubBuilt-in pull/runManual file management
Optional paid cloudNoYes (Ollama Cloud)No

OpenAI client migration: The vLLM quickstart documents /v1/models, /v1/completions, and /v1/chat/completions on its server. Ollama documents a subset of the OpenAI API, including those endpoints; its local examples use http://localhost:11434/v1/. The llama.cpp README identifies llama serve as an OpenAI-compatible API server. Compatibility does not mean every model, parameter, or stateful workflow transfers unchanged: test the exact requests your application sends before migrating it.

Detailed Comparison

Concurrency: Why vLLM Is Worth Evaluating Under Load

A simple LLM server may process requests in fixed batches. Say one request in the batch generates 2,000 tokens and the others finish after 50. The GPU sits partly idle until the long one is done, and new requests wait in line.

Continuous batching fixes that. The scheduler works at the level of single generation steps. When a request finishes, a waiting request takes its slot on the very next step.

PagedAttention handles the memory side. It stores the attention key-value cache in pages instead of one big block per request, which can use KV-cache memory more flexibly; actual request capacity still depends on model, context length, and scheduler settings. NVIDIA’s vLLM Release Notes (updated October 15, 2026) describe these two features as vLLM’s core design.

Both features are relevant when many requests are in flight. With one request at a time, there is less work to interleave. That architectural difference supports evaluating vLLM for shared serving; it does not establish a performance ranking against the other engines. Measure the same model, hardware, context length, quantization, and request mix before choosing a winner.

NVIDIA vLLM release notes page showing the table of contents and list of recent release entries

First candidate to evaluate: vLLM, for workloads with sustained concurrent requests. Confirm the fit on your own hardware and model.

Single-User Use: Convenience Versus Runtime Control

Ollama identifies llama.cpp among its supported backends. Verify your exact model, engine version, and configuration before comparing performance; the shared project name alone does not establish the same code path or settings.

Ollama adds model downloads, storage, and a simpler command surface. The Ollama repository identifies llama.cpp among its supported backends. A shared backend does not guarantee equal throughput: model format, context size, offload settings, and versions still matter.

Choose by workflow: Ollama favors convenience; llama.cpp exposes direct runtime and model-file control. This article does not establish a measured speed tie.

Why Benchmark Numbers Vary So Much

You’ll find blog posts showing vLLM several times faster than Ollama, and others showing them nearly even. Both can be accurate, because they measure different things. Before you trust any number, check whether the source lists:

  • GPU model and VRAM. A data-center card and a consumer card can flip the results.
  • Model and size. A 1.5B model behaves differently from a 70B model.
  • Quantization format. A 4-bit GGUF and an unquantized model aren’t comparable workloads.
  • Concurrency level. One stream vs. 32 parallel requests is the biggest swing factor.
  • Date and engine version. All three projects ship often.

If a source skips any of these, treat its numbers as anecdotal. Published benchmarks can help you shortlist, but the most decisive benchmark is one you run on your own hardware, at your own concurrency level.

Hardware Floor

vLLM: The current vLLM quickstart (v0.32.0) lists Linux as the primary platform and Python 3.11–3.14. It provides paths for NVIDIA, AMD, Intel GPUs, Google TPU, and Ascend via a community plugin, and points Apple Silicon users to vLLM-Metal.

For AMD GPUs, the quickstart’s ROCm wheel path currently supports Python 3.12, ROCm 7.0 and glibc ≥ 2.35. Other backends and wheels can have different requirements, and they change between vLLM releases, so check the install docs for your exact setup. CPU-only vLLM exists, but GPU serving is what it’s built for. The official docs don’t state an exact minimum VRAM.

Ollama and llama.cpp: Both commonly run on CPU-only machines and modest consumer GPUs. They use quantized GGUF models, which shrink memory needs. A mini PC or an older workstation with an NVMe SSD for model storage is a realistic start. The exact minimum depends on model size and quantization.

Winner: llama.cpp, with Ollama close behind.

Setup and Platform Support

Linux

Before following vLLM’s NVIDIA path, install uv using its linked instructions in the vLLM quickstart, confirm your GPU/driver meets the selected release’s requirements, and choose a model that fits available memory. Gated models may require model-provider access and authentication. These snippets assume those prerequisites are satisfied:

vLLM’s documented install path for NVIDIA GPUs uses uv:

# Create a Python 3.12 virtual environment; --seed installs pip into it
uv venv --python 3.12 --seed
source .venv/bin/activate
# --torch-backend=auto picks a PyTorch build that matches your CUDA setup
uv pip install vllm --torch-backend=auto

For the documented AMD wheel path, use Python 3.12, ROCm 7.0, and glibc ≥ 2.35. The quickstart recommends uv because it gives the extra index priority over the default index; changing the URL alone does not make an arbitrary environment compatible:

uv venv --python 3.12 --seed
source .venv/bin/activate
# Command as published in the v0.32.0 quickstart's AMD section
uv pip install vllm --extra-index-url https://wheels.vllm.ai/rocm/

This is the generic ROCm index exactly as the v0.32.0 quickstart shows it. ROCm wheels are built per vLLM release, so if you need a specific vLLM version or a different ROCm release, use the versioned wheel instructions in vLLM’s GPU installation docs for that release instead of this command.

The vLLM quickstart adds an optional step: vllm download-kernels installs precompiled kernels that vLLM would otherwise download and compile at startup, which it says can add several minutes on Hopper and newer GPUs:

vllm download-kernels

Then start a server, substituting the model you want to run:

vllm serve MODEL_NAME

Keep the initial server reachable only from your trusted test environment; do not expose an unauthenticated model endpoint publicly. In a second terminal, use the quickstart’s model-list request:

curl http://localhost:8000/v1/models

A successful check returns a JSON model list containing the served model. This is an expected response description, not captured test output. A refused connection, error response, or missing model means you should inspect startup logs before continuing. Watch for backend, driver, or GPU-memory errors; Common Gotchas below covers those.

Ubuntu 24.04 desktop with a terminal open in a Python virtual environment, ready to run the vLLM install commands

The current llama.cpp README offers an installer, Docker, prebuilt binaries, and source builds. Use its current installation instructions and inspect any installer before executing it. Its documented quickstart now uses llama cli and llama serve:

# Official README example: download and serve this GGUF model
llama serve -hf ggml-org/Qwen3.5-0.8B-GGUF

The command surface depends on the distribution: the current README quickstart uses the llama.app-style llama serve, while packaged or other builds may expose llama-server. Use the help command and matching documentation for the binary you installed before transferring flags. This command launches an OpenAI-compatible API server; it is not a performance benchmark.

Ollama’s standard invocation is one command. It pulls the model if it isn’t already there, then starts an interactive session:

ollama run MODEL_NAME

Use the official Ollama README for current Linux installation instructions. It documents ollama run gemma4 as a concrete chat example; replace MODEL_NAME with an available model that fits your hardware. Follow the current project README for flags and installation options.

Public Ollama GitHub README showing the ollama run example command

macOS

The current llama.cpp README sends users to llama.app for installation and offers prebuilt binaries and source builds. Apple Silicon is explicitly a first-class backend, using ARM NEON, Accelerate, and Metal. Follow the installation option appropriate to your system.

vLLM’s v0.32.0 quickstart also points Mac users to vLLM-Metal for Apple Silicon acceleration. That is a separate installation path from the Linux CUDA/ROCm commands above.

Ollama’s README provides macOS download and installation options. For a personal Mac deployment, compare Ollama’s model-management workflow with llama.cpp’s direct runtime controls.

macOS Finder Applications folder showing the Llama desktop app (from the llama.cpp project) installed

Windows

The current llama.cpp README provides a PowerShell installer path through llama.app, as well as downloadable binaries. Follow that project’s current Windows instructions rather than assuming Linux shell commands apply.

Ollama’s README also provides Windows installation options. The vLLM quickstart lists Linux as its primary OS; use its platform-specific installation documentation to establish a supported deployment before attempting it on a Windows host.

Windows 11 Start menu search showing the installed Llama desktop app (from the llama.cpp project)

Winner: Ollama on ease of setup. vLLM has the most moving parts: Python version, glibc, and CUDA/ROCm matching.

Pricing Comparison

All three engines have no software subscription charge for local self-hosting; hardware, electricity, hosting, and administration still cost money. Ollama also sells an optional cloud service for its hosted models, and you don’t need it to run models locally. Concurrency limits only apply to Ollama’s cloud plans — self-hosted inference with any of the three engines is limited by your own hardware, not by a plan tier.

Ollama explained its pricing model in its transparent pricing announcement; the current figures on Ollama’s pricing page (checked October 29, 2026) are:

TierPriceConcurrent requests (cloud only)What you get
Self-hosted (any engine)No software fee; infrastructure extraLimited by your own hardware, not a planRun on your own hardware, no subscription
Ollama Pay-as-you-go$0 base, pay per token for cloud models3Pay-per-token cloud models; local use remains free
Ollama Pro$20/month, or $200/year billed annually ($16.67/month equivalent)3$60 of usage credits per month; access to larger pro models
Ollama Max$100/month10$300 of usage credits per month; early access to the newest models
Ollama Team (early access)$500/month10Unlimited users; $1,000 of usage credits per month shared across the team; centralized billing
Ollama EnterpriseCustomCustomModel access controls, cost budgets, dedicated support

Ollama has updated its Cloud pricing structure before and may do so again. The table above reflects pricing as published on Ollama’s pricing page as of October 2026 — check the official page for any changes before budgeting.

Ollama public pricing page showing the Pay-as-you-go, Pro, Max, Team, and Enterprise tier table

For self-hosting, your real costs are hardware and power. That means a GPU sized to your models, plus a UPS if the box serves other people.

Use Case Recommendations

Choose vLLM if:

  • Several users or apps send requests at the same time
  • You have a supported backend and an OS, Python version, and driver stack matching its installation path
  • You want an API server for apps already written against the OpenAI API (confirm endpoint coverage first)
  • You can manage Python environments and CUDA/ROCm versions

Choose Ollama if:

  • You’re the only user, or close to it
  • You want to pull and swap models quickly without managing files
  • You’re on macOS or Windows, or on modest hardware
  • You might want access to hosted cloud models later

Choose llama.cpp if:

  • You have no GPU or only a modest one
  • You want direct control over model files, quantization, and runtime flags
  • You want minimal dependencies on an edge box or small homelab server

vLLM

Pros
  • Continuous batching and PagedAttention built for concurrent load
  • Documented NVIDIA, AMD, and TPU support
  • Active release cadence, tracked in vLLM’s release notes
Cons
  • Highest hardware floor; its high-throughput serving use case assumes a GPU or other accelerator
  • Strict glibc, Python, and CUDA version requirements
  • Separate installation paths for different backends, including vLLM-Metal on Apple Silicon

Ollama

Pros
  • Simplest workflow of the three
  • Model management around supported inference backends
  • Runs on CPU and modest GPUs
Cons
  • Less optimized than vLLM for high-concurrency, high-throughput serving
  • Less fine-grained control than raw llama.cpp
  • The cloud tiers can be confused with the free local product

llama.cpp

Pros
  • Broadest hardware flexibility
  • Lightweight, with few dependencies
  • Full control over models and runtime options
Cons
  • Most manual workflow
  • You manage model files yourself
  • Serving behavior and resource limits need tuning and workload-specific testing

Common Gotchas

Slow first vLLM startup on a newer GPU. On Hopper and newer GPUs, vLLM may be downloading and compiling kernels at startup. On releases that include it (the v0.32.0 quickstart documents it), run vllm download-kernels before the first vllm serve.

glibc error when installing vLLM. The v0.32.0 quickstart specifies glibc ≥ 2.35 for its Python 3.12/ROCm 7.0 wheel path. Do not apply that number to every backend. Check the requirements for your exact wheel, platform, and release before choosing an OS change or another supported installation path.

Python version error. Current vLLM needs Python 3.11–3.14. Older tutorials cite 3.8–3.12. Create a fresh environment with uv venv --python 3.12 --seed instead of reusing an old one.

Wrong CUDA build. vLLM wheels are built against specific CUDA and PyTorch versions, and the supported combinations change between releases. Check the GPU installation guide for your vLLM version, match the install to your CUDA driver, and don’t copy commands from old tutorials written for an earlier CUDA release.

Final Verdict

The right engine depends on your concurrency and hardware. vLLM is a strong candidate to evaluate for shared serving on a supported accelerator. Ollama is the default for single-user work on almost any machine.

Ollama documents llama.cpp as one of its supported backends, and llama.cpp is a lightweight option when hardware is tight or you want full control. These recommendations reflect each engine’s documented design — different serving and deployment priorities — not a controlled benchmark comparing them head-to-head.

Use the decision matrix above as a shortlist, then test representative requests and resource limits before committing. No numerical throughput scores are assigned because this article contains no controlled comparative benchmark.

Help & Answers

Frequently Asked Questions

6 questions

Which engine should I use to serve multiple users or apps at once?

Use vLLM if you have a supported GPU on Linux. Continuous batching is designed for exactly this workload.

Which engine should I use for single-user local inference?

Use Ollama for convenience or llama.cpp for control. Compare speed with your own model and settings; this article establishes no measured tie.

Do I need a GPU?

Not for llama.cpp or Ollama. Both run on CPU-only machines (slower, but usable with quantized models). vLLM has CPU-only builds, but its strengths depend on GPU or TPU acceleration.

Does Ollama use the same backend as llama.cpp?

Ollama identifies llama.cpp among its supported backends. That does not establish identical performance or behavior for every model and release. Match model format, runtime settings, and versions before comparing results.

Why do benchmark numbers vary so much between sources?

GPU, model size, quantization, concurrency level, and software versions all change the results. Few posts hold all of them constant.

What’s the realistic hardware floor for vLLM vs. the other two?

For the accelerator-serving deployment discussed here, choose hardware supported by the relevant vLLM installation path. The glibc ≥ 2.35 requirement cited above belongs specifically to its documented Python 3.12/ROCm 7.0 wheels.

The docs don’t state an exact minimum VRAM. Ollama and llama.cpp can start on a CPU-only box.

Wrapping Up

You can pick an engine without leaning on anyone’s benchmark charts. Start with your concurrency, then check your hardware. Not sure? Starting with Ollama is low-risk, and you can move to vLLM once real multi-user load shows up and you have the GPU for it.

StepActionApplies To
1Estimate how many simultaneous requests you need to serveAll
2Check your exact backend, OS, Python, wheel, and driver requirementsvLLM
3Start with ollama run for interactive use or the current llama serve quickstart for API servingOllama, llama.cpp
4Move to vllm serve when concurrent load growsvLLM
5Benchmark on your own hardware before committingAll

This comparison reflects official documentation available at the time of writing. Versions, pricing, and platform support may have changed since publication.