Repository navigation
Replies: 14 comments
What is vLLM?vLLM began as a research project at UC Berkeley's Sky Computing Lab (the PagedAttention paper was published at SOSP 2023) and has grown into one of the most active open-source AI projects, with 2,000+ contributors. It sits between model weights and your application: load a Hugging Face model and vLLM exposes an HTTP server speaking the OpenAI Chat Completions API, so existing clients (OpenAI SDK, Cursor, Claude Code, your own app) can point at it with minimal changes. It is built for serving rather than single-shot demos: high concurrency, efficient memory use, streaming, structured output, tool calling, and distributed inference are all first-class paths. The project is vendor-neutral and community-governed, with releases and fixes landing frequently. |
Core Architecture: PagedAttentionThe KV cache is the memory bottleneck in LLM serving: it grows with sequence length and concurrency, and conventional implementations pre-allocate contiguous blocks, wasting 60–80% of memory on fragmentation and reservation. PagedAttention borrows virtual memory paging from operating systems:
Result: fragmentation near zero, much larger batches on the same GPU, and higher throughput. This idea is now adopted across the serving ecosystem. See the announcement post and the paper. |
Key Capabilities
|
Supported ModelsvLLM seamlessly supports 200+ model architectures on Hugging Face, usually without model-specific code changes:
Full list: supported models. New models from major labs are typically added quickly after release. |
Supported HardwarevLLM runs on a wide hardware matrix:
This breadth means the same service code can move between cloud GPUs, on-prem clusters and newer accelerator types with minimal changes. Check the installation guide for the exact backend status. |
Typical Use Cases
|
Quick StartInstall (NVIDIA CUDA, recommended with uv venv --python 3.14 --seed
source .venv/bin/activate
uv pip install vllm --torch-backend=auto
vllm download-kernels
Offline batched inference: from vllm import LLM, SamplingParams
llm = LLM(model="Qwen/Qwen2.5-1.5B-Instruct")
outputs = llm.generate(["Hello, my name is"], SamplingParams())
print(outputs[0].outputs[0].text)Start an API server (default vllm serve Qwen/Qwen2.5-1.5B-InstructAMD ROCm uses a different index: |
OpenAI-Compatible APIThe server implements the OpenAI API protocol, so most OpenAI clients work by changing only List models: curl http://localhost:8000/v1/modelsCompletions: curl http://localhost:8000/v1/completions \
-H "Content-Type: application/json" \
-d '{
"model": "Qwen/Qwen2.5-1.5B-Instruct",
"prompt": "San Francisco is a",
"max_tokens": 7,
"temperature": 0
}'Python client: from openai import OpenAI
client = OpenAI(api_key="EMPTY", base_url="http://localhost:8000/v1")
resp = client.chat.completions.create(
model="Qwen/Qwen2.5-1.5B-Instruct",
messages=[{"role": "user", "content": "Tell me a joke."}],
)
print(resp.choices[0].message.content)Chat Completions, models and completions endpoints are implemented; Anthropic Messages API and gRPC are also available. Auth can be enabled with |
Distributed Serving & Advanced FeaturesParallelism — tensor, pipeline, data, expert and context parallelism let one model span multiple GPUs and nodes; pick the combination that fits the model and interconnect. Disaggregated serving — split prefill, decode and encode into separate pools so each stage uses hardware suited to it, improving utilization at large scale. Structured output — Multi-LoRA — serve many LoRA adapters on top of one base model with near-single-model throughput. Speculative decoding — n-gram, suffix, EAGLE and DFlash draft models reduce per-token latency on interactive workloads. See the serving docs for flags and examples. |
The vLLM Ecosystem
The project is widely integrated as the serving backend in higher-level frameworks, which is why it is often the default engine people meet when deploying open models. |
Performance & ProductionvLLM's throughput and memory-efficiency claims come from the PagedAttention design plus continuous batching; the project publishes reproducible benchmark recipes rather than only headline numbers.
Always benchmark on your own model, hardware and traffic mix — the best engine depends heavily on prefix reuse patterns and latency targets. |
License & Pricing
|
FAQIs vLLM a model or a chatbot? No — it is a serving engine. You supply the model weights. Does it need a GPU? No, there is CPU support, but GPUs (NVIDIA/AMD) are the mainstream path; TPU/Gaudi/Ascend/Apple Silicon work through plugins. Can I use it with OpenAI SDK? Yes. Point Which models work? 200+ HF architectures are supported; check the list before committing. How is it different from SGLang? vLLM emphasizes breadth of model/hardware support and a mature general-purpose serving stack; SGLang emphasizes RadixAttention prefix reuse, agent/RL workloads and diffusion generation. Both expose OpenAI-compatible APIs. Is it production-ready? Yes — it is widely deployed, actively maintained and released frequently. Benchmark your own workload before choosing. |
Links & Resources
tag: LLM Inference / Serving / Open Source / UC Berkeley |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
vLLM: Detailed Introduction
vLLM is an open-source, high-throughput and memory-efficient inference and serving engine for large language models, originally developed in the Sky Computing Lab at UC Berkeley and now maintained by a community of 2,000+ contributors from academic institutions and companies worldwide. Its stated goal is "easy, fast, and cheap LLM serving for everyone."
What it is. An inference engine, not a chatbot or a model: you bring your own open-weight model from Hugging Face, and vLLM runs it as an OpenAI-compatible API service (also Anthropic Messages API and gRPC). It is the default serving engine for a large share of open-model deployments.
Signature capability. PagedAttention — manages the KV cache in fixed-size pages like an OS virtual memory, nearly eliminating memory fragmentation and enabling much larger batch sizes on the same GPU memory. Combined with continuous batching, chunked prefill and prefix caching.
Scale / adoption. One of the most active open-source AI projects; ~97.7k stars, 25.4k forks, 200+ supported model architectures, and a broad hardware matrix from NVIDIA/AMD GPUs to TPU, Gaudi, Ascend and Apple Silicon.
Hardware. NVIDIA and AMD GPUs, x86/ARM/PowerPC CPUs, plus plugin backends for Google TPU, Intel Gaudi, IBM Spyre, Huawei Ascend, Rebellions NPU, Apple Silicon, MetaX and Iluvatar CoreX.
License / price. Apache-2.0, free and self-hosted; you pay only for your own hardware.
Repo. ~97.7k stars, 25.4k forks, Apache-2.0, with very active releases and commits.
Unique Advantages (vs Competitors)
torch.compilegraph transformations.Table of Contents
Product intro
Getting started
Ecosystem & resources
Click a TOC item to jump to the floor; if it does not respond in-page, open the link in a new tab.
All reactions