Black Friday: Save 10% for life on all of our VPS plans, now through Cyber Monday

10% off on selected plans for as long as you keep the service · new orders · up to 10 uses per customer · ends Dec 1, 2026, 12:00 AM EST.

See plans
Guideschevron_rightServers

Servers · 8 min read · Updated

vLLM vs Ollama vs llama.cpp: Which LLM Server to Use

Pick Ollama for the quickest setup and one user or a small team, llama.cpp when you want every setting in your hands or need to run on a processor, or split a model between CPU and GPU, and vLLM (or SGLang) to serve many users at once from GPUs. All of them speak an OpenAI-compatible API, so you can start with one and move to another later by changing a base URL.

vLLM vs Ollama vs llama.cpp at a Glance

vLLM, Ollama and llama.cpp compared for self-hosting
FeaturevLLMOllamallama.cpp
Best forMany users at once on GPUsQuickest setup, one user or a small teamFull control, CPU or CPU + GPU
LicenceApache 2.0MITMIT
ModelsHugging Face models; FP8, MXFP4, AWQ, GPTQ, GGUF and moreThe Ollama model libraryGGUF files, from Hugging Face with -hf
Processor onlySupported, GPU-first designYesYes
Several GPUsTensor, pipeline, data and expert parallelismSpreads a model across GPUsSplit by layer or tensor (--split-mode)
Many users at onceContinuous batching, prefix cachingOne request per model by default (OLLAMA_NUM_PARALLEL)Server slots (--parallel), continuous batching on
API key--api-key or VLLM_API_KEYNone built in--api-key or LLAMA_API_KEY
Default addressPort 8000127.0.0.1:11434127.0.0.1, set the port with --port

Sources: the vLLM documentation, Ollama's FAQ and the llama-server README.

Which One Should You Choose?

  • Trying models, a private chat, a few users: Ollama. One command installs it as a service, another downloads and runs a model. Put Open WebUI in front for a ChatGPT-style interface.
  • A server with no GPU, or a GPU too small for the model: llama.cpp. It runs 4-bit GGUF models on the processor, and --n-cpu-moe keeps a mixture-of-experts model's expert weights in system memory while the rest runs on the GPU. See running an LLM on a CPU server.
  • An API for an app with many users: vLLM. Continuous batching serves many requests together, and vLLM reserves the GPU memory left after the weights for the conversation cache, so spare memory means more users at once. See serving an LLM API on a GPU server.
  • Agent workloads and large-scale serving: SGLang is worth testing next to vLLM. It is an Apache 2.0 serving framework for language and multimodal models, aimed at agentic workloads and large-scale serving, and runs on NVIDIA and AMD GPUs among others (SGLang on GitHub).

Whichever you choose, the model has to fit: check how much VRAM a model needs and whether a GPU or a CPU server is the better buy.

Ollama: Install and Run a Model

curl -fsSL https://ollama.com/install.sh | sh
ollama run gemma4
# OpenAI-compatible API: http://127.0.0.1:11434/v1

Ollama listens on 127.0.0.1:11434 and has no API key, so keep it there and reach it over an SSH tunnel or through a proxy that checks a key. Its server settings are environment variables; add them with sudo systemctl edit ollama.service:

[Service]
Environment="OLLAMA_NUM_PARALLEL=4"
Environment="OLLAMA_CONTEXT_LENGTH=8192"
Environment="OLLAMA_KEEP_ALIVE=-1"

OLLAMA_CONTEXT_LENGTH defaults to 4096 tokens, and models unload after 5 minutes idle unless OLLAMA_KEEP_ALIVE says otherwise. Run sudo systemctl daemon-reload && sudo systemctl restart ollama after editing.

llama.cpp: Run llama-server

Install llama.cpp from its releases or build it as the README describes, with CUDA if you have an NVIDIA GPU. Then start the server with a model from Hugging Face:

llama-server -hf ggml-org/gpt-oss-20b-GGUF --jinja \
  -c 32768 --parallel 4 \
  --host 127.0.0.1 --port 8080 \
  --api-key "$(openssl rand -hex 24)"

-ngl sets how many layers go to the GPU (auto by default), --n-cpu-moe N keeps the experts of the first N layers on the CPU, and the built-in chat page is on the same address. The gpt-oss guide shows these flags on a real model.

vLLM: Serve an OpenAI-Compatible API

Install vLLM with the quickstart (it needs Python 3.11 or newer), or use the vllm/vllm-openai Docker image. Then:

vllm serve Qwen/Qwen2.5-1.5B-Instruct --api-key "$(openssl rand -hex 24)"
# listening on http://localhost:8000/v1

Test Any of Them the Same Way

Only the port, the key and the model name change:

curl http://127.0.0.1:8000/v1/chat/completions \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "Qwen/Qwen2.5-1.5B-Instruct",
       "messages": [{"role": "user", "content": "Say hello in five words."}]}'

To give several apps or people their own keys and budgets across all your engines, put a LiteLLM proxy in front.

Common Questions

  • Is vLLM faster than Ollama?

    For many users at once on a GPU, vLLM is built for it: continuous batching and prefix caching keep the GPU busy across requests. Ollama serves one request per model at a time unless you raise OLLAMA_NUM_PARALLEL, so it suits one person or a small team. For a single user the gap is much smaller.

  • Is Ollama built on llama.cpp?

    Ollama's README credits the llama.cpp project among its supported backends. Ollama adds a model library, automatic downloads and a background service on top, while llama.cpp gives you its server and every setting directly.

  • Can vLLM run without a GPU?

    Yes. vLLM supports x86, ARM and PowerPC processors and publishes a CPU image, vllm/vllm-openai-cpu. It is still designed around GPUs; for processor-only servers, llama.cpp and Ollama with 4-bit GGUF models are the usual choice.

  • Do they all work with the OpenAI SDK?

    Yes. vLLM, Ollama, llama.cpp's llama-server and SGLang all offer OpenAI-compatible endpoints such as /v1/chat/completions, so an app built for one can switch to another by changing the base URL and model name.

Plans and prices

GPU Servers

Dedicated GPU servers with full root access for vLLM, Ollama or llama.cpp.

See all plans
  • Intel Core Ultra 9 285K w/ NVIDIA Tesla P4

    NVIDIA Tesla P4 · 8 GB GPU

    24 Cores · 192 GB RAM · 2x 3.84TB NVMe Gen4

    Los Angeles, CA (LA1) · 50 TB transfer · 25 Gbps

    $589.00/mo

  • NVIDIA DGX Spark

    NVIDIA DGX Spark · 128 GB GPU

    20 Cores · 128 GB RAM · 4TB NVMe Gen4

    Ogden, UT (UT1) · 50 TB transfer · 10 Gbps

    $609.00/mo

    Sold out
  • AMD EPYC 7443P w/ NVIDIA RTX 3090

    NVIDIA RTX 3090 · 24 GB GPU

    24 Cores · 256 GB RAM · 3.84TB NVMe

    Ogden, UT (UT1) · 100 TB transfer · 10 Gbps

    $659.00/mo

  • AMD Ryzen 9 9950X w/ NVIDIA RTX 3050

    NVIDIA RTX 3050 · 6 GB GPU

    16 Cores · 192 GB RAM · 2x 2 TB NVMe

    Ashburn, VA (ASH1) · Dallas, TX (TX3) · New York, NY (NY2) · Charlotte, NC (NC1) · Bend, OR (OR1) · Unmetered transfer · 1 Gbps

    $699.00/mo

Keep Reading

All guides