Skip to main content
Find my setup
Language: English

vLLM, Ollama, llama.cpp or SGLang: which to run on a rented GPU

For one person on a rented GPU, Ollama or llama.cpp is the simplest choice. For many users at once, pick vLLM or SGLang, which keep the card busy with many requests together.

In Red Hat's test on one A100, vLLM peaked at 793 tokens a second against Ollama's 41. In a July 2026 test on a rented RTX 4090, SGLang and vLLM came out level.

The figures come from those two published tests and from each engine's own documentation. We read them all on 27 October 2026.

Close-up of a car engine in a glossy red engine bay
The serving engine is the software that runs the model on the card. Photo: Luke Miller, Pexels.

Who this is for

  • you are putting an open model on a rented GPU and must pick the software
  • you expect more than one user at a time
  • you want the set-up commands for each engine

Not for you if you have not chosen a card yet: start with our speed figures by card.

Key numbers

  • 793 tokens per second vLLM's peak with many requests at once, in Red Hat's test on one A100 Official page,
  • 41 tokens per second Ollama's peak in the same test Official page,
  • 19 times how much more vLLM served than Ollama at peak Our calculation,

What a serving engine does

A serving engine loads the model onto the GPU and answers requests over the network. All four offer an API in OpenAI's format, so most apps and agent tools can connect to any of them.

They differ in how they share the card between requests. By their own documentation, vLLM and SGLang batch requests together and reuse the shared beginnings of prompts, which suits many users.

Ollama and llama.cpp run compressed GGUF files and suit one machine with a few users. Ollama's README names llama.cpp as its backend, wrapped in a simpler tool with its own model library.

Pick Ollama or llama.cpp for one user, and vLLM or SGLang for many.

The four engines on 27 October 2026: latest versions and licences from GitHub, file types from their documentation
EngineLatest versionLicenceModel filesBest for
Ollama0.40.11MITits own library (ollama pull)one person, the quickest start
llama.cpp0.7.0MITGGUF files from Hugging Faceone person or a few, full control; also runs on a processor
vLLM0.32.0Apache 2.0Hugging Face files, including FP8, GPTQ, AWQ and GGUFmany users at once
SGLang0.5.22Apache 2.0Hugging Face filesmany users, especially prompts that share a beginning

Many users at once: two published tests

Red Hat compared vLLM 0.9.1 with Ollama 0.9.2 on one A100 with 40 GB, using Llama 3.1 8B at 16-bit. It raised the number of requests at once from 1 to 256.

At peak, vLLM served about 19 times as many tokens a second as Ollama Peak tokens per second, Llama 3.1 8B at 16-bit, one A100 40 GB; Red Hat, August 2025
The numbers in this chart
ItemNumber
vLLM 0.9.1793 tokens/s
Ollama 0.9.241 tokens/s

Red Hat also ran Ollama with up to 32 requests at once (OLLAMA_NUM_PARALLEL=32).

Ollama handled four requests at a time by default then, and Red Hat raised its limit to 32. Its FAQ now gives a default of one request at a time per model.

Red Hat's article dates from August 2025, and both engines have changed since. Its conclusion: Ollama for one user and development, vLLM for many users.

The second test, by ComputingForGeeks, ran SGLang 0.5.15 and vLLM 0.25.1 on an RTX 4090 rented from vast.ai in July 2026. Both served Qwen2.5-7B-Instruct to 64 requests at once.

Totals were level; SGLang wrote each token faster once it started, while vLLM started answers far sooner.

SGLang and vLLM on one rented RTX 4090, Qwen2.5-7B-Instruct, 64 requests at once (ComputingForGeeks, July 2026)
MeasureSGLang 0.5.15vLLM 0.25.1
Tokens a second in total (read and written)5,1555,221
Tokens written a second1,7181,740
Median wait for the first token3,045 ms849 ms
Median time per written token29.1 ms34.0 ms
Start-up time58 s79 s

That test used unrelated prompts, so it could not show SGLang's cache for prompts that share a beginning, as its author notes.

One user at a time

With one request at a time, the card's memory speed and the size of the model file set the pace. Our speed figures by card show this across many cards.

Ollama and llama.cpp usually run 4-bit GGUF files, about a third of the 16-bit size. By that rule they write faster for one user on the same card, unless vLLM or SGLang also get a 4-bit file.

Set up each engine on a rented GPU

The commands below serve the same small model, Qwen2.5-7B-Instruct, on Ubuntu with an NVIDIA card and its driver installed. They follow each engine's own documentation.

Ollama

Ollama installs with one script and pulls a 4.7 GB file at 4-bit. It answers on port 11434, with an OpenAI-style API under /v1.

bash

curl -fsSL https://ollama.com/install.sh | sh
ollama pull qwen2.5:7b
curl http://localhost:11434/v1/chat/completions -H "Content-Type: application/json" \
  -d '{"model": "qwen2.5:7b", "messages": [{"role": "user", "content": "Hello!"}]}'

For more than one user, raise OLLAMA_NUM_PARALLEL as our Ollama guide shows. Its FAQ warns that memory use grows with each extra request.

llama.cpp

Build llama.cpp with CUDA as our speed figures page shows. Then download a 4-bit file and start the server with four slots, so it answers four requests at once:

bash

wget https://huggingface.co/lmstudio-community/Qwen2.5-7B-Instruct-GGUF/resolve/main/Qwen2.5-7B-Instruct-Q4_K_M.gguf
./build/bin/llama-server -m Qwen2.5-7B-Instruct-Q4_K_M.gguf -ngl 99 -c 32768 -np 4 --port 8080

Its API answers at http://localhost:8080/v1. The server listens only on the machine itself unless you add --host.

vLLM

By its documentation, vLLM needs Linux, Python 3.11 to 3.14 and an NVIDIA card from the T4 and RTX 20 series onwards. Install it in its own Python environment with uv:

bash

sudo apt install -y ninja-build
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv --python 3.12 --seed && source .venv/bin/activate
uv pip install vllm --torch-backend=auto
vllm download-kernels
vllm serve Qwen/Qwen2.5-7B-Instruct --api-key choose-a-long-key

It downloads the 15.2 GB model at 16-bit and answers at http://localhost:8000/v1. Callers must then send the key you chose.

In the RTX 4090 test above, vLLM kept 6.5 GiB of the card for conversations, enough for about 122,000 tokens.

SGLang

SGLang also needs Linux, and its current version needs a driver that supports CUDA 13, by its documentation. Install it the same way:

bash

sudo apt install -y ninja-build
uv venv --python 3.12 && source .venv/bin/activate
uv pip install --prerelease=allow sglang
sglang serve Qwen/Qwen2.5-7B-Instruct --port 30000

Its API answers at http://localhost:30000/v1. The RTX 4090 test found that both SGLang and vLLM need the ninja-build package; without it, the first request fails.

Whichever engine you pick, keep its port closed to the internet or put a proxy with a password in front. Both vLLM and llama.cpp can also require an API key.

Which engine for which job

  • One person, a chat window or an agent on the same server: Ollama. For a chat window your whole team can use, see our guide to a private chat assistant for a team.
  • One person or a few who want full control: llama.cpp. It can also keep part of a model on the processor when the card is too small.
  • A team or an app with many users at once: vLLM.
  • Many users whose prompts share a long beginning, such as one system prompt: SGLang or vLLM, which both cache that part.
  • A model on its release day: check its model card. For Qwen3.8, Qwen recommends SGLang, vLLM or TokenSpeed, as our Qwen3.8-27B guide notes.
24 GB cards (RTX 4090), the card of the July 2026 test. Prices checked on 25 Oct 2026.
PlanPriceNew-customer offerLink
GPU Mart Enterprise Dedicated GPU Server - RTX 4090 24 GB GPU $409/month monthly rate of a 24-month term, paid in advance · VAT not stated checked 25 Oct 2026 A free 24-hour trial of a VPS, dedicated or GPU server for new clients, on request checked 29 Oct 2026 Visit
Unihost AZM-04, NVIDIA RTX 4090 24 GB GPU €359.90/month monthly, paid in advance; minimum one month checked 25 Oct 2026 No offer Visit
Unihost AND-G5, Nvidia RTX 4090 24 GB GPU €459.90/month monthly, paid in advance; minimum one month checked 25 Oct 2026 No offer Visit

Dedicated monthly servers suit steady use.

Settings that matter most

  • Conversation length: each engine reserves memory for it. Set what you need with OLLAMA_CONTEXT_LENGTH, llama.cpp's -c or vLLM's --max-model-len.
  • Requests at once: Ollama's OLLAMA_NUM_PARALLEL and llama.cpp's -np. vLLM and SGLang batch on their own; vLLM caps the number with --max-num-seqs.
  • Share of the card's memory: vLLM and SGLang claim most of it at start-up (--gpu-memory-utilization, --mem-fraction-static), so run one engine per card.

How we checked

We read Red Hat's and ComputingForGeeks' published tests, each engine's README and documentation, and their latest releases on GitHub, on 27 October 2026. The ratio between vLLM and Ollama is our calculation.

Our own measurements will be added here, with their dates, when our test bench runs them.

Mistakes to avoid

  • Using Ollama's defaults for a team

    Instead: It answers one request per model at a time; raise the limit or use vLLM.

  • Running two engines on one card

    Instead: vLLM and SGLang reserve most of the memory when they start.

  • Comparing a 16-bit vLLM run with a 4-bit Ollama run

    Instead: Compare engines with files of the same size.

  • Opening the API port to the internet

    Instead: Use an API key, or a proxy with a password.

Other questions

Is vLLM faster than Ollama?

With many users at once, by far: 793 against 41 tokens a second at peak in Red Hat's 2025 test. For one user, the model file and the card matter more than the engine.

Is SGLang faster than vLLM?

In a July 2026 test on an RTX 4090 the two were level in total. SGLang wrote each token faster, and vLLM started answers sooner.

Does Ollama use llama.cpp?

Yes. Ollama's README lists llama.cpp as its supported backend.

Sources and test notes

Every page read on 27 October 2026. The test results are other people's published runs, credited above; the 19-times ratio is our calculation.

Back to Where to run an open model