A high-throughput and memory-efficient inference and serving engine for LLMs
open sourceApache-2.0self-hostablefree
vLLM is an open source engine for serving large language models at high throughput: PagedAttention manages the KV cache in pages so many requests share GPU memory, continuous batching keeps the GPU busy, and chunked prefill, automatic prefix caching, speculative decoding and multi-LoRA serving cut latency and cost. vllm serve starts an OpenAI-compatible HTTP server for hundreds of open models (or offline batch inference from Python), with tensor, pipeline, data and expert parallelism across GPUs and nodes and quantized weights (GPTQ, AWQ, FP8, INT8, GGUF, bitsandbytes and more). It runs on NVIDIA CUDA and AMD ROCm GPUs, Intel XPU, Google TPUs, AWS Neuron and other accelerators through plugins, and on x86, Arm, Apple silicon and IBM Z CPUs. It began at UC Berkeley, is hosted by the PyTorch Foundation and is Apache-2.0 licensed; the vLLM production stack adds a router, autoscaling and a Helm chart for Kubernetes.
Ways to install
On your own server
On Kubernetes
Problems it solves
- serve an open-weight LLM to many concurrent users on our own GPUs with high throughput
- self-host Llama, Qwen or Mistral behind an OpenAI-compatible API so our existing code works unchanged
- our GPU sits mostly idle because requests are processed one at a time
- KV cache memory runs out when many long chat requests hit our model server
- split a model too big for one GPU across several GPUs or several machines
- run batch inference over millions of prompts on our own GPU cluster as cheaply as possible
- serve many LoRA fine-tunes of one base model from a single GPU deployment
- serve quantized FP8, AWQ or GPTQ models to fit a larger model on fewer GPUs
- speed up token generation with speculative decoding on our self-hosted models
- run LLM inference on AMD GPUs, Google TPUs or AWS Trainium instead of only NVIDIA
- reuse cached prompt prefixes so a long shared system prompt isn't recomputed on every request
- production LLM serving on Kubernetes with request routing and autoscaling
- move from Ollama to something that handles production traffic on data-centre GPUs
- serve embedding, reranking and vision-language models from the same self-hosted engine
- constrain an LLM's output to JSON matching a schema on our own inference server
- replace our Hugging Face Text Generation Inference (TGI) servers now that TGI only gets maintenance fixes
Features
- PagedAttention memory management for the KV cache
- continuous batching and chunked prefill
- OpenAI-compatible API server (vllm serve) and offline batch inference
- automatic prefix caching
- speculative decoding
- multi-LoRA serving
- tensor, pipeline, data and expert parallelism across GPUs and nodes
- quantization: GPTQ, AWQ, Marlin, FP8, INT8 and INT4 via LLM Compressor, GGUF, bitsandbytes, AMD Quark, TorchAO and more
- structured outputs (JSON schema, regex, grammar)
- NVIDIA CUDA, AMD ROCm, Intel XPU and Gaudi, Google TPU, AWS Neuron and Huawei Ascend through hardware plugins
View 3 more
- CPU backends for x86, Arm AArch64, Apple silicon and IBM Z
- official Docker image vllm/vllm-openai
- vLLM production stack: router, autoscaling and observability installed with a Helm chart
Limitations
- Doesn't run natively on Windows: use WSL with a Linux distribution or a community fork3
Capabilities
| Has an API | plan not known |
|---|---|
| Has a command line tool | plan not known |
| Takes plugins | plan not known |
| Has official SDKs | plan not known |
Alternatives
The same job
These do what vLLM does.
- SGLang Fast inference for LLMs and multimodal models
- LocalAI Your own AI, on your own hardware
- Ray Serve Scalable model serving library for building online inference APIs
- Ollama Start building with open models, locally or in the cloud
- llama.cpp LLM inference in C/C++
- NVIDIA Dynamo-Triton Open source inference serving software that deploys AI models from any major framework
