vLLM
A high-throughput, memory-efficient inference and serving engine for LLMs, with PagedAttention, continuous batching, and an OpenAI-compatible API server.
vLLM is an Apache-2.0 inference and serving engine for open-weight LLMs, started at UC Berkeley's Sky Computing Lab. PagedAttention and continuous batching keep a GPU busy under concurrent load, and `vllm serve` exposes an OpenAI-compatible API on port 8000. It targets Linux with Python 3.11 to 3.14; the latest release is v0.34.0, from November 2026.
vLLM is an open-source library for LLM inference and serving, built to run open-weight models with high throughput on GPUs. It started in the Sky Computing Lab at UC Berkeley and is now maintained by a community the project counts at more than 2,000 contributors. Its original idea, PagedAttention, manages the attention key-value cache the way an operating system pages virtual memory, so less GPU memory is lost to fragmentation. Combined with continuous batching, where new requests join a running batch, that keeps the hardware busy when many requests arrive at once.
The repository is Apache-2.0 licensed and had about 97.7k GitHub stars as of November 2026. The latest release, v0.34.0, shipped on November 16, 2026.
Highlights
- PagedAttention and continuous batching. The two techniques behind the throughput numbers, alongside chunked prefill and prefix caching.
- OpenAI-compatible server.
vllm serve <model>exposes/v1/chat/completions,/v1/completionsand/v1/modelson port 8000. The README also lists an Anthropic Messages API and gRPC. - Quantization. FP8, INT8, INT4, GPTQ, AWQ and GGUF among others, to fit a larger model into less memory at some cost in quality.
- Parallelism. Tensor, pipeline, data, expert and context parallelism for spreading one model across GPUs or nodes.
- Structured output and tools. Constrained generation through xgrammar or guidance, plus tool-calling and reasoning parsers that you enable per model (
--enable-auto-tool-choice,--tool-call-parser). - Multi-LoRA. Serve several LoRA adapters on one base model.
- Model and hardware coverage. More than 200 model architectures on Hugging Face (Llama, Qwen, Gemma, Mixtral, DeepSeek, multimodal and embedding models) on NVIDIA, AMD and Intel GPUs, and x86, ARM and PowerPC CPUs.
In an AI-assisted workflow
Install it, start a server, and call it with the OpenAI client you already use:
# Linux, Python 3.11-3.14; uv picks the PyTorch build that matches your CUDA driver
uv pip install vllm --torch-backend=auto
# start an OpenAI-compatible server on http://localhost:8000
vllm serve Qwen/Qwen2.5-1.5B-Instructfrom openai import OpenAI
client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")
reply = client.chat.completions.create(
model="Qwen/Qwen2.5-1.5B-Instruct",
messages=[{"role": "user", "content": "Summarize PagedAttention in one sentence."}],
)
print(reply.choices[0].message.content)The model value must match the name you passed to vllm serve. A server process hosts one model, so run one process per model and put a router such as LiteLLM in front if clients need several.
TIP
Most of vLLM's throughput comes from keeping the batch full. Tune --max-num-seqs, --gpu-memory-utilization, --max-model-len and, for a model that spans GPUs, --tensor-parallel-size against your GPU and latency target. The llm-inference-engineer agent tunes these against a p95 and cost budget, and Scaffold a vLLM Serving Config writes a starting config.
Good to know
- Platform. The docs list Linux and Python 3.11 to 3.14. Windows is not supported natively; use WSL. Apple Silicon is covered by vLLM-Metal on macOS Sonoma or later.
- CUDA. Release wheels target CUDA 13.0. vLLM 0.32.0 was the last release with CUDA 12.9 binaries, so check your NVIDIA driver before upgrading an older node.
- Sampling defaults. The server applies the model repository's
generation_config.jsonif one exists, which can override default sampling parameters. Pass--generation-config vllmto use vLLM's own defaults when results differ from what you expect. - No auth by default. The server accepts any request unless you set
--api-keyorVLLM_API_KEY. Keep it behind your own network boundary or gateway either way. - Fast release cadence. v0.34.0 alone contains 1,061 commits. Pin the version in production and read the release notes before upgrading.
- Cost. The software is free; you pay for the GPUs. Whether that beats a hosted API depends on utilization, which Self-Host vs API works through.
For a single developer running a model on a laptop, Ollama or LM Studio is the simpler fit, and llama.cpp is the engine to reach for on CPUs and Apple Silicon. The closest Apache-2.0 alternative for GPU serving is SGLang, which competes on the same workloads and is worth benchmarking on your own traffic before you commit.
Frequently asked questions
- How do I install vLLM and serve a model?
- On Linux with Python 3.11 to 3.14, run uv pip install vllm --torch-backend=auto, then vllm serve Qwen/Qwen2.5-1.5B-Instruct. The server listens on http://localhost:8000 and hosts one model per process. Point any OpenAI client at http://localhost:8000/v1; pass --api-key or set VLLM_API_KEY if you want the server to check a key.
- Does vLLM run on Windows or macOS?
- Not natively on Windows: the docs say to use WSL with a Linux distribution. On macOS, the docs describe vLLM-Metal for Apple Silicon GPUs, which needs macOS Sonoma or later and Python 3.14. The main target remains Linux with NVIDIA GPUs; AMD ROCm and Intel GPU builds are documented separately.
- Which CUDA version does vLLM need?
- Release wheels are built against CUDA 13.0 by default. The installation docs say vLLM 0.32.0 was the last release with CUDA 12.9 binaries, so later releases need an NVIDIA driver that supports CUDA 13, and NVIDIA Blackwell GPUs (B200, GB200) need at least CUDA 12.8.
- vLLM vs Ollama: which should I use?
- They do different jobs. vLLM is serving infrastructure for Linux GPU machines where many requests arrive at once and cost per token matters. Ollama and LM Studio are built for one person running a model on a laptop. Prototype on Ollama, then move to vLLM when concurrent users hit a self-hosted model.
Filed under
llm · inference · serving · gpu · open-source
Related
- GuideSelf-Host vs API: When Does Running Your Own LLM Actually Pay Off?The real economics of self-hosting an LLM vs. calling a hosted API — GPU utilization, privacy, latency, and the hidden ops costs that decide the crossover.
- ToolLM StudioA free desktop app for downloading and running open-weight LLMs locally on llama.cpp or MLX, with an OpenAI-compatible server, SDKs and a headless daemon.
- ToolOllamaAn open-source tool that runs open-weight LLMs locally with one command and serves them through OpenAI- and Anthropic-compatible APIs, plus paid cloud models.
- AgentLLM Inference EngineerUse this agent to serve and optimize self-hosted LLM inference — sizing GPUs, configuring a serving engine like vLLM (continuous batching, PagedAttention, tensor parallelism), applying quantization, and tuning throughput and tail latency against a cost and p95 budget. Examples — "serve Llama-3-70B at p95 under 2s on our GPUs", "our self-hosted model is slow and the GPUs sit half-idle — raise throughput", "quantize this model to fit one GPU without wrecking quality".
- CommandScaffold a vLLM Serving ConfigScaffold a vLLM serving config for a model on a target GPU — pick precision/quantization and parallelism to fit, set batching and context length, and expose an OpenAI-compatible server.
- TermInferenceInference is running a trained model to produce output — for LLMs, generating tokens one at a time. Its cost and latency define the economics of AI products.
- GuideBest Open-Source LLMs in 2026: The Open-Weight Families ComparedThe open-weight LLM families current in November 2026, from DeepSeek, Mistral Large 4, and Qwen to Gemma 4 and Muse, with sizes, context, and exact licences.
- TermSpeculative DecodingSpeculative decoding speeds up generation: a small draft model proposes tokens, the large model verifies them in one parallel pass — same output, fewer steps.