Independent hosting research · no paid rankings

Desk checked

Setup Basics

Should you choose vLLM or Ollama for LLM inference?

Published: Last checked:

GPU benchmarks show vLLM has far higher LLM inference throughput and lower first-token wait than Ollama, which is simpler for local model management.

vLLM and Ollama solve adjacent problems. Ollama makes downloading, switching, and running models locally simple. vLLM serves models to apps and controls how requests use GPU resources. In the benchmark on two matching Hostinger GPU hosting instances, each with 1× NVIDIA L40S with 48 GB GPU memory, both ran Qwen2.5-Coder-7B-Instruct at 16-bit floating-point precision with a 4,096-token context limit. At eight concurrent requests, vLLM produced 371.63 tokens/s and had a 0.19 seconds median wait for first text; Ollama produced 10.86 tokens/s and waited 143.6 seconds. The gap was 34.22 times in output throughput and 770.8 times in median first-text wait.

Should you choose vLLM or Ollama for LLM inference?

Benchmark design

ItemvLLMOllama
Main purposeServe models to appsDownload, manage, and run models locally
ArchitectureShared inference engine schedules requests and manages GPU memoryServer loads models and manages separate model runners
Model compatibilitySupported models from Hugging Face or a local pathModels from Ollama’s library or compatible local files, including Safetensors and GGUF
Ease of useRequires more serving and deployment configurationSimpler workflow for downloading, switching, and running models
Concurrent requestsServe multiple requests at once and control how many run concurrentlyRun multiple requests in parallel per model; extra requests wait in a queue when capacity is full
GPU supportNVIDIA GPUs with compute capability 7.5+, supported AMD GPUs, and separate Apple Silicon supportNVIDIA GPUs with compute capability 5.0+, supported AMD GPUs, and native Apple Silicon support
Multi-GPU useSplit model execution across multiple GPUs or serversUse one GPU when the model fits; otherwise, spread the model across available GPUs
SettingConfiguration
Test dateNovember 4, 2026
HostTwo matching Hostinger GPU hosting instances, one engine per instance
GPU1× NVIDIA L40S with 48 GB GPU memory
CPU2 cores
RAM64 GB
Storage100 GB
Operating systemUbuntu 24.04
NVIDIA driver580.159.03
vLLM version0.33.0
Ollama version0.40.14
ModelQwen2.5-Coder-7B-Instruct at 16-bit floating-point precision
Context limit4,096 tokens
vLLM sourceQwen/Qwen2.5-Coder-7B-Instruct from Hugging Face
Ollama sourceqwen2.5-coder:7b-instruct-fp16

The same Python benchmark client sent prompts containing sample Python code and asked the model to rewrite it with validation, type hints, and pytest tests. Responses streamed with a 256-token output limit, temperature=0, top_p=1, and seed=42. Failed requests were not automatically retried. Tests used one, four, and eight concurrent requests, 32 measured requests per level, three repetitions, 96 measured requests per load, and 288 per engine. The order changed: 1 to 4 to 8, 8 to 4 to 1, and 4 to 1 to 8. Three warmup requests per repetition were excluded. Startup time, answer quality, maximum capacity, and tuning were not measured.

Throughput: the gap widens with concurrency

Throughput here means aggregate output tokens generated per second across all active requests. It shows how much total text the server produces when multiple requests are running, not how fast one individual response finishes.

Concurrent requestsvLLM output tokens/sOllama output tokens/svLLM vs. Ollama
149.796.497.67 times
4188.1810.4617.99 times
8371.6310.8634.22 times

Each throughput value is the median of three measured rates at that concurrency level. From one to four concurrent requests, vLLM’s throughput increased about 278%, from 49.79 to 188.18 tokens/s. It then increased another 97.5% when concurrency doubled from four to eight, reaching 371.63 tokens/s. Across the full range from one to eight requests, vLLM’s tested deployment increased total throughput 7.46 times.

Ollama moved differently. Its throughput increased about 61.2% from one to four concurrent requests, from 6.49 to 10.46 tokens/s, but grew just 3.8% from four to eight, reaching 10.86 tokens/s. Its overall increase was only 1.67 times. In this benchmark, the tested vLLM deployment converted additional concurrent demand into much more total output, while the tested Ollama deployment gained little additional throughput between four and eight requests even though it handled twice as many requests at once.

First-text latency: queueing pressure becomes visible

The benchmark measured the wait from sending a request until the first nonempty streamed text appeared. This includes API handling, server queueing, and prompt processing before generation starts.

Concurrent requestsvLLM median waitOllama median waitvLLM vs. Ollama
10.0367 seconds1.600 seconds43.6 times shorter
40.0951 seconds51.434 seconds540.8 times shorter
80.1863 seconds143.599 seconds770.8 times shorter

For each engine and concurrency level, the median comes from 96 measured requests: 32 requests across three repetitions. vLLM’s median wait increased from about 37 milliseconds with one request to 186 milliseconds with eight, roughly a 5.1 times increase. That still means users would see the first text almost immediately in an interactive application.

Ollama’s median wait rose from 1.6 seconds with one request to 51.4 seconds with four, then reached 143.6 seconds, or about 2 minutes and 24 seconds, with eight concurrent requests. The measured delay changed from a noticeable wait to several minutes before any response appeared. The benchmark shows how long the delay lasted, but it does not reveal how much came from queueing, prompt processing, or another server-side factor.

Why architecture creates the gap

vLLM receives requests through an API, decides which requests to process, and returns generated tokens to the application. Its scheduler uses available GPU memory and processing capacity to decide which requests run together. To generate a new token, the model needs information calculated from earlier tokens. vLLM keeps that information in a key-value cache, so the model does not recalculate it for every new token.

PagedAttention, vLLM’s method for organizing that cache, splits memory into small, fixed-size blocks. A request receives more blocks as it grows, and blocks are freed when the request finishes. The blocks do not need to sit next to each other in GPU memory, reducing wasted space. vLLM also uses continuous batching: after each round of token generation, the scheduler checks requests and adds waiting requests as capacity becomes available instead of waiting for every request in the original group to finish.

Ollama runs a model by loading it into memory and passing each request to a model runner. The runner performs calculations on the CPU, GPU, or both. The ollama run command and the Ollama API send requests to the same server, which reuses a runner if the model is already loaded or starts one when needed. Ollama keeps models loaded when memory allows.

For GPT-Generated Unified Format models, Ollama uses a llama.cpp-based runner. It also supports a runner based on MLX, Apple’s machine learning framework, for compatible models on Apple Silicon. A Modelfile lets a user save how Ollama should run a model, including the base model, default parameters, a system prompt, and a prompt template, without changing the original model weights.

For concurrency, OLLAMA_NUM_PARALLEL controls how many requests one model processes at the same time. Extra requests wait in a queue when capacity is full. Processing more requests in parallel uses more memory. That design favors a simple local workflow, but in this benchmark it left aggregate throughput and first-text latency behind vLLM as concurrency grew.

GPU memory and cost signals

For the same model, precision, and context limit, nvidia-smi snapshots showed 40.06 GiB allocated to vLLM and 14.20 GiB allocated to Ollama. The vLLM snapshot was about 2.8 times as large. The vLLM launch used --gpu-memory-utilization 0.90, allowing it to allocate up to 90% of GPU memory for model execution and the key-value cache. Ollama had no equivalent setting recorded. Therefore, 40.06 GiB does not represent the minimum GPU memory needed to run Qwen2.5-Coder-7B-Instruct with vLLM. Actual GPU memory needs for either tool depend on model size, precision or quantization, context length, concurrency, and memory settings.

At the 110-credit/hour rate shown for each Hostinger NVIDIA L40S instance in the benchmark, the source excerpt reports that vLLM’s estimated cost per million output tokens was 61. The excerpt stops before the full unit and the Ollama comparison are given, so this article cannot turn that fragment into a total cost ranking. Higher throughput can spread hardware time across more output tokens, but the exact cost per token depends on the completed pricing calculation.

What readers should decide

For local development, experimentation, model switching, and personal use, Ollama’s simpler workflow is the main advantage. For an application that must handle several users or several requests at once, the benchmark’s 371.63 tokens/s and 0.19 seconds median first-text wait show why vLLM’s serving architecture is more relevant.

The comparison is not a universal verdict. The benchmark treated the two deployments as different serving setups. It verified that both used the same model name and precision, but not that the underlying model files were identical revisions. It did not measure model startup time, answer quality, or maximum server capacity, and it did not tune either engine for best possible performance. Both vLLM and Ollama completed every measured request without a recorded failure, so the difference is not reliability in this test. It is scheduling, memory management, and serving orientation.

Sources and specification basis

The article is based on the benchmark source material provided: Hostinger GPU hosting instances, NVIDIA L40S, Ubuntu 24.04, NVIDIA driver 580.159.03, vLLM 0.33.0, Ollama 0.40.14, Qwen2.5-Coder-7B-Instruct, qwen2.5-coder:7b-instruct-fp16, Qwen/Qwen2.5-Coder-7B-Instruct, the recorded test date of November 4, 2026, and the measured throughput, latency, and GPU memory snapshots.

Last updated: November 4, 2026.

Spec tagsOllamavLLMLLM inferenceGPU servingbenchmarks

Reader notes 0

  • No notes yet. Corrections and first-hand test results are welcome.