LLM Serving With vLLM 2026: Deploying Open Models as a Production API
You picked a model and now need to serve it like a product: high throughput, low latency, OpenAI-compatible API. vLLM is the 2026 standard for this. Here is the complete deployment walkthrough.
💡 What You Will Learn
You picked a model and now need to serve it like a product: high throughput, low latency, OpenAI-compatible API. vLLM is the 2026 standard for this. Here is the complete deployment walkthrough.
📜 Table of Contents
Why vLLM Is the Default
vLLM (88,691 stars) is the most widely adopted open source LLM serving engine. Its superpowers: continuous batching (10-24x throughput vs naive serving), PagedAttention (efficient KV cache memory, see the KV cache guide), and an OpenAI-compatible API server out of the box.
The Minimal Deployment
# install
pip install vllm
# serve a model with one command
python -m vllm.entrypoints.openai.api_server \n --model Qwen/Qwen3-8B \n --tensor-parallel-size 1 \n --port 8000
# it is OpenAI-compatible
curl http://localhost:8000/v1/chat/completions \n -H "Content-Type: application/json" \n -d '{"model":"Qwen/Qwen3-8B","messages":[{"role":"user","content":"hi"}]}'
Your existing OpenAI SDK code works by changing base_url. That compatibility is the killer feature: zero code change to swap a hosted API for self-hosted vLLM.
The Production Checklist
- GPU sizing - match model+KV cache to VRAM (see the hardware guide): a 7-8B Q4 needs ~8GB, FP16 ~16GB.
- Quantization - serve AWQ/GPTQ or FP8 versions for 2-4x more throughput per GPU (see the quantization guide).
- Continuous batching - already on; tune max_num_seqs for your traffic.
- Prefix caching - enable automatic prefix caching (vllm flag) so repeated system prompts skip recomputation.
- Speculative decoding - add a small draft model for 1.5-2x latency wins (see the speculative decoding guide).
- Observability - vLLM exposes Prometheus metrics; wire them into Grafana (see the observability guide).
- Autoscaling - behind a load balancer, scale replicas on GPU utilization or queue depth.
Throughput vs Latency Tuning
- High concurrency, throughput-first: raise max_num_seqs, accept higher p95 latency.
- Interactive apps, latency-first: lower concurrency, use speculative decoding, keep the batch small.
- Measure both p50/p95 latency and tokens/sec; they trade off against each other.
The Alternatives When vLLM Is Not the Fit
| Need | Alternative |
|---|---|
| Rust/edge binary, CPU | llama.cpp server (123,325 stars) |
| Highest throughput at scale | SGLang (31,628 stars) |
| Simple local GUI | Ollama (178,206 stars) |
| Fully managed | TGI (Hugging Face) or cloud |
The Honest Caveats
- vLLM is GPU-hungry: on a single small GPU, Ollama/llama.cpp may serve you better.
- Frequent model updates: vLLM tracks new architectures fast but occasionally lags bleeding-edge models.
- For CPU-only serving, do not use vLLM - llama.cpp is the right tool.
