What Is vLLM? The Open-Source LLM Serving Engine, Explained
vLLM serves one model to many users at once. How PagedAttention and continuous batching work, what it needs, and whether you should use it.
Key takeaways
- vLLM is an open-source inference and serving engine for large language models, started at UC Berkeley in 2023 and released under Apache 2.0.
- Its purpose is throughput under concurrency: many requests sharing one GPU. It does not make a single chat faster.
- Two ideas do the work: PagedAttention, which stores the KV cache in small pages instead of large reserved blocks, and continuous batching, which refills the batch at every generated token.
- It loads Hugging Face weights, typically BF16, so a model takes about three times the VRAM of the 4-bit GGUF Ollama would pull, unless you serve an AWQ, GPTQ or FP8 build.
- Best on Linux with NVIDIA GPUs. No native Windows build, and no GPU acceleration on Macs in the main project.
vLLM in three sentences
Your private ChatGPT, free, on your own machine in an hour — LM Studio, Ollama, Open WebUI, your documents, no cloud.
- Lifetime online access
- PDF + files
- 30-day refund
vLLM is a Python library and server that loads a model from Hugging Face onto one or more GPUs and exposes it through an OpenAI-compatible HTTP API. It came out of the Sky Computing Lab at UC Berkeley alongside the paper "Efficient Memory Management for Large Language Model Serving with PagedAttention" (Kwon et al., SOSP 2023). As of September 20, 2026, it is the default choice when a team or an application, rather than one person, needs to share a self-hosted model.
The problem it solves
While a model generates, it keeps a running record of everything it has read and written so far: the KV cache. That cache grows with every token, and nobody knows in advance whether a reply will be twenty tokens or two thousand. Early serving systems handled the uncertainty by reserving one contiguous slab of GPU memory per request, sized for the worst case.
The vLLM paper measured the consequence: in existing systems, only 20 to 40 percent of KV-cache memory held actual token state. The rest was lost to over-reservation and fragmentation. Wasted memory means fewer requests in flight, which means an expensive GPU idling at a fraction of what it could serve.
PagedAttention: virtual memory for the KV cache
The fix borrows a fifty-year-old idea from operating systems. Instead of one big contiguous block per request, vLLM splits the KV cache into small fixed-size pages, allocates them on demand, and places them anywhere in GPU memory. A block table maps the logical order of tokens to the physical location of pages, exactly the way an OS maps a process's address space onto scattered RAM.
| Contiguous allocation | PagedAttention | |
|---|---|---|
| Memory reserved per request | Maximum possible length, up front | One page at a time, as tokens arrive |
| Waste reported in the paper | 60–80% | Under 4% |
| Shared prefixes (same system prompt) | Duplicated for every request | Stored once, pages shared |
| Effect | Few concurrent requests | Several times more requests on the same GPU |
Continuous batching: no request waits for another
A naive server groups requests into a batch and waits for every one of them to finish before starting the next batch. A short answer sits idle behind a long one, and the GPU does padding work. vLLM rebuilds the batch at every decoding step. The moment one sequence finishes, its slot goes to a waiting request. Combined with paged memory, this keeps the GPU saturated with useful work, which is where the large throughput gains over single-user runtimes come from.
The same engine adds the features a production endpoint needs: tensor parallelism across GPUs (--tensor-parallel-size), automatic prefix caching, speculative decoding, structured JSON output, multi-LoRA serving, and quantized formats designed for batched GPU math (AWQ, GPTQ, FP8). GGUF support exists but is experimental.
What vLLM puts in your VRAM
This is the most common surprise for people arriving from Ollama. Ollama pulls a 4-bit GGUF by default. vLLM loads the weights as published, usually BF16, at about 2 GB per billion parameters. Same model, triple the footprint, before any KV cache.
| Model | BF16 (vLLM default) | 4-bit GGUF (Ollama default) | Smallest setup for BF16 |
|---|---|---|---|
| Qwen 3 8B | 16 GB | 5 GB | One 24 GB card |
| Gemma 4 12B | 24 GB | 7 GB | RTX 5090 (32 GB) |
| Qwen 3 14B | 28 GB | 9 GB | RTX 5090, short context |
| Mistral Small 3.2 24B | 48 GB | 14 GB | 2 × RTX 5090, or one 80 GB card |
| Qwen 3.8 27B | 54 GB | 16 GB | One 80 GB card |
| Llama 3.3 70B | 140 GB | 40 GB | 2 × 80 GB cards |
Weights only, from the BestLLMfor model catalog, September 20, 2026.
The way out is to serve a GPU-native quantized build. A 4-bit AWQ or GPTQ model occupies roughly what the GGUF does, and FP8 halves BF16 on recent cards. Most popular models have such builds on Hugging Face.
"vLLM is using all my VRAM." By design. At startup vLLM claims 90% of GPU memory (--gpu-memory-utilization, default 0.9): weights first, everything left over becomes KV-cache pages. More pages means more concurrent requests. On a machine that does other things, lower the value.
Where it runs
| Platform | Status | In practice |
|---|---|---|
| Linux + NVIDIA (CUDA) | Primary target | Best-tested path. Compute capability 7.0 or higher: Volta, Turing (RTX 20) and newer. |
| Linux + AMD (ROCm) | Supported | Instinct and recent Radeon cards; use the dedicated Docker image. |
| Windows | No native build | Run it under WSL2 with an NVIDIA GPU. |
| Apple Silicon | CPU only, experimental | No Metal acceleration in the main project. On a Mac, use MLX, Ollama or llama.cpp. |
| CPU only | Supported | Fine for testing an integration, not for serving. |
Quick start
python -m venv vllm-env && source vllm-env/bin/activate
pip install vllm
vllm serve Qwen/Qwen3-8B --max-model-len 8192
The first launch downloads the model, then serves on port 8000. Any OpenAI client works by changing the base URL:
curl http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model": "Qwen/Qwen3-8B", "messages": [{"role": "user", "content": "Hello"}]}'
Set --max-model-len from day one. Without it, vLLM sizes the cache for the model's full advertised context, sometimes 128K tokens or more, and refuses to start if memory cannot cover it. For a containerized setup, follow vLLM in Docker with CUDA. Full documentation is at docs.vllm.ai and the source at github.com/vllm-project/vllm.
Should you use vLLM?
| Your situation | vLLM? | Why |
|---|---|---|
| One person chatting on their own PC | No | No speed gain for a single stream, three times the VRAM at BF16. |
| You are on a Mac | No | No GPU path. MLX and llama.cpp use unified memory properly. |
| 8–12 GB of VRAM | Rarely | A 4-bit GGUF with partial CPU offload does more for you. |
| A team of 5 to 50 sharing one model | Yes | Continuous batching serves everyone from one GPU. |
| An app that calls the model in bursts | Yes | Queueing, high throughput, standard API. |
| Batch-processing thousands of documents | Yes | The scenario where the throughput gap is widest. |
If you are deciding between the two most common options, read vLLM vs Ollama for the short version and Ollama vs vLLM for production self-hosting for costs and migration. For the wider engine landscape, see ExLlama vs vLLM vs llama.cpp. Sizing figures used here are available through the BestLLMfor public API (CC BY 4.0) and our open-source MCP server.
Frequently asked questions
What is vLLM used for?
Serving a large language model to many users or requests at once through an OpenAI-compatible API. Typical uses are an internal assistant for a team, the backend of an application, and offline batch processing of large document sets.
Is vLLM faster than Ollama?
For a single user, no: generation speed for one stream is bound by GPU memory bandwidth, which is the same in both. The gap appears under concurrency, where vLLM batches requests together and its total throughput is several times higher.
Is vLLM free?
Yes. It is open source under the Apache 2.0 license, usable commercially without fees. You pay only for the hardware or the GPU rental.
Does vLLM run on Windows or Mac?
Not natively on Windows; use WSL2 with an NVIDIA GPU. On Apple Silicon the main project only supports CPU execution, which defeats its purpose. Ollama, LM Studio or MLX are better choices on a Mac.
Can vLLM run GGUF models?
Support exists but is experimental and slower. vLLM is built for Hugging Face safetensors weights and for AWQ, GPTQ and FP8 quantization. If you want GGUF, llama.cpp and its llama-server are the natural tool.
How many users can one GPU serve with vLLM?
It depends on the memory left for KV-cache pages once the weights are loaded, and on conversation length. With a quantized 8B model on a 24 GB card, several dozen short concurrent conversations is realistic. The only reliable answer comes from a load test with your own prompts.
A current option for local AI: GMKtec EVO-X2 64GB / 1TB (Ryzen AI Max+ 395). Match memory to your model and software. A mini PC is a complete PC alternative; Mac/MLX and CUDA instructions require compatible hardware.
Amazon Check GMKtec EVO-X2 64GB / 1TB (Ryzen AI Max+ 395) price →As an Amazon Associate, BestLLMfor earns from qualifying purchases, at no extra cost to you. It does not influence our independent rankings.
Found an error or have feedback? Let us know — it helps everyone who reads this guide.