// video
Ollama vs vLLM (video)
Updated
Chapters
- 0:00 Two servers, one question
- 0:33 What each one is for
- 0:59 Ollama: one request at a time
- 1:29 Ollama: models in memory
- 1:48 vLLM: continuous batching
- 2:11 Model formats and quantization
- 2:43 The API each exposes
- 3:06 Which job each fits
- 3:32 Run either on NVIDIA Brev
The film shows in motion that Ollama by default works one request at a time per loaded model and queues the rest, while vLLM batches incoming requests continuously; we ran no speed test.
Transcript
One GPU, one open model to serve: should it run on Ollama or on vLLM? Both serve language models and offer an OpenAI-compatible API. The difference is the job each is set up for. We ran no speed test, so this film compares fit, not speed.
vLLM's documentation calls it a library for language model inference and serving. It names PagedAttention, which manages attention key and value memory, and continuous batching of incoming requests. Ollama loads models on demand and keeps them in memory between requests, so one person can switch between models.
By default, Ollama processes one request at a time per loaded model on most backends. The rest wait in a queue of up to 512. Past that, it answers with a 503 overloaded error. You can raise the parallel setting, but more parallel requests need more memory: a 2K context with four parallel requests becomes an 8K context.
Ollama can also keep up to three models loaded per GPU, when they fit in memory. A model stays loaded for five minutes after use; the keep alive setting changes that. If a new model does not fit, its requests wait until idle models unload.
In vLLM, continuous batching groups incoming requests on the GPU. One setting, max num seqs, caps how many requests share a batch; lowering it needs less KV cache memory. When the cache runs short, vLLM can preempt a request and recompute it later.
Model formats differ too. Ollama imports GGUF files and Safetensors weights through a Modelfile. It does not quantize GGUF models during import, so you quantize first with a GGUF tool. vLLM runs Hugging Face models and supports quantized weights, including FP8, INT8, INT4, GPTQ, AWQ and GGUF.
An OpenAI client can reach either one by changing its base URL. Ollama supports a subset of the OpenAI API under the v1 path, including chat completions and embeddings. vLLM ships an OpenAI-compatible server, plus the Anthropic Messages API and gRPC. You start it with vllm serve and a model name.
So which one fits? For one person who wants a private assistant and several models to try, Ollama's defaults fit the job. For an API that a team or an application calls at the same time, vLLM's continuous batching fits. Both can sit behind Open WebUI. Test both on your own GPU and model.
To try either one, 9owls publishes a Launchable for each on NVIDIA Brev. The Ollama plus Open WebUI starter runs on an NVIDIA L4 with 24 gigabytes of GPU memory. Open WebUI plus vLLM runs on an NVIDIA L40S with 48 gigabytes. Our deploy guide walks through the steps.
To recap: Ollama queues requests per model and keeps several models loaded, which suits one person. vLLM batches requests continuously, which suits many callers on one model.
www.9owls.com.