Short answer
In vLLM vs SGLang, both engines offer continuous batching, prefix caching, quantization, speculative decoding, multi-GPU parallelism and an OpenAI-compatible API, so either is a strong choice. vLLM (from UC Berkeley, built around PagedAttention) has the broadest model and hardware support and the largest ecosystem, with about 97,000 GitHub stars in November 2026. SGLang (from LMSYS, built around RadixAttention) often delivers higher throughput on workloads with shared prefixes such as multi-turn chat, agents and RAG, has very fast structured (JSON) output, and is widely used for large mixture-of-experts models and reinforcement-learning rollouts. Choose vLLM for breadth and stability; choose SGLang for prefix-heavy, agentic or structured-output workloads, and benchmark both on your own traffic.
At a glance
| vLLM | SGLang | |
|---|---|---|
| Origin | UC Berkeley Sky Computing Lab (2023) | LMSYS (late 2023) |
| Core idea | PagedAttention: KV cache stored in fixed-size blocks like virtual memory pages | RadixAttention: KV cache stored in a radix tree for automatic prefix reuse |
| Latest versions (Nov 2026) | v0.32.0 stable (Oct 2026) | v0.5.23 (Nov 2026) |
| GitHub stars (Nov 9, 2026) | ~96,600 | ~38,600 |
| Governance | Hosted by the PyTorch Foundation | Open-source project (sgl-project) |
| Default API port | 8000 | 30000 |
| Licence | Apache 2.0 | Apache 2.0 |
How they work
vLLM's PagedAttention splits each request's KV cache into blocks, eliminating most memory waste and allowing many more concurrent requests. Its automatic prefix caching reuses blocks for repeated prompt prefixes.
SGLang's RadixAttention keeps the KV cache of previous requests in a radix tree and automatically matches new requests against shared prefixes (system prompts, few-shot examples, conversation history, documents). Combined with a cache-aware scheduler, this can avoid a lot of repeated prefill work. See prefill vs decode.
Feature comparison
| Feature | vLLM | SGLang |
|---|---|---|
| Continuous batching | Yes | Yes |
| Prefix caching | Automatic prefix caching (block-based) | RadixAttention (tree-based, cache-aware scheduling) |
| Structured output (JSON, regex, grammar) | Yes (xgrammar, guidance backends) | Yes, highly optimised (JSON, regex, EBNF) |
| Speculative decoding | Yes (EAGLE, n-gram, draft models, MTP) | Yes (EAGLE, MTP and others) |
| Quantization | FP8, FP4/NVFP4, AWQ, GPTQ, GGUF and more | FP8, FP4, AWQ, GPTQ and more |
| Tensor / pipeline / expert parallelism | Yes | Yes |
| Prefill-decode disaggregation | Yes | Yes (PD and encode-prefill-decode) |
| Multi-LoRA serving | Yes, mature | Yes |
| Multimodal models | Broad support | Broad support |
| Embedding and reward models | Yes | Yes |
| Frontend programming language | — | SGLang DSL for multi-call LLM programs |
| OpenAI-compatible API | Yes | Yes |
See speculative decoding, What is LoRA? and mixture of experts.
Hardware support
| Hardware | vLLM | SGLang |
|---|---|---|
| NVIDIA GPUs | Yes | Yes |
| AMD Instinct (MI300X–MI355X) | Yes | Yes |
| Google TPU | Yes | Yes (listed for recent TPU generations) |
| Intel GPUs and Gaudi | Yes (plugins) | Limited |
| CPUs (x86, ARM, PowerPC) | Yes | Limited |
| Apple Silicon | Limited | Listed support |
| Ascend NPUs | Via plugin | Listed support |
vLLM's plugin system gives it the widest hardware reach. See ROCm vs CUDA and Intel Arc for AI.
What benchmarks show
| Source | Finding | Caveats |
|---|---|---|
| LMSYS (SGLang launch, January 2024) | Up to 5× higher throughput than vLLM on prefix-heavy workloads | Old versions; published by SGLang's authors |
| Community benchmark (March 2026, H100, Llama 3.1 8B) | SGLang ~16,200 tok/s vs vLLM ~12,500 tok/s | Concurrency and settings not fully specified |
| Same source (100 concurrent users, shared context) | SGLang ~10–20% ahead | Workload-specific |
| General pattern | Gap narrowed substantially after vLLM's V1 engine (2025); results flip depending on model, batch size and features | Always test your own traffic |
Bottom line: SGLang tends to lead when many requests share prefixes or when using structured output; vLLM is often equal on simple, unique-prompt workloads and wins on model coverage. Neither is universally faster. Compare with What is TensorRT-LLM? and LLM inference engines compared.
Workload guide
| Workload | Better fit | Why |
|---|---|---|
| Multi-turn chatbots | SGLang | Conversation history reused via RadixAttention |
| Agents and tool-calling loops | SGLang | Repeated system prompts and context |
| RAG with shared documents | SGLang | Prefix reuse |
| JSON / structured extraction at scale | SGLang | Fast constrained decoding |
| RL rollouts for training reasoning models | SGLang | Widely used by RL frameworks (e.g. verl, slime) |
| Large MoE models (DeepSeek-class) | Both; SGLang popular for large-scale expert parallel deployments | Both support EP and disaggregation |
| Many LoRA adapters | vLLM | Mature multi-LoRA |
| Unusual models or hardware | vLLM | Widest coverage |
| Simple single-model API serving | Either | Similar performance |
| Local single-user chat | Neither ideal | Use Ollama/LM Studio; see Ollama vs LM Studio |
Quick start
vLLM
pip install vllm
vllm serve Qwen/Qwen3-8B --max-model-len 32768
# OpenAI API at http://localhost:8000/v1SGLang
pip install "sglang[all]"
python -m sglang.launch_server --model-path Qwen/Qwen3-8B --port 30000
# OpenAI API at http://localhost:30000/v1Both accept the same OpenAI client code by changing the base URL. If you hit memory errors, see CUDA out of memory.
Cost impact
Serving cost per token = GPU price ÷ throughput. A 20% throughput gain cuts cost per token by about 17%. On an H100 at the December 2026 median of $3.92/hour (GPU price report), that adds up quickly for busy services. See LLM inference cost per token.
Frequently asked questions
Is SGLang faster than vLLM?
Often on prefix-heavy, multi-turn and structured-output workloads. On simple workloads they are frequently close, and results depend on versions and settings.
Is vLLM or SGLang better for production?
Both run in large production deployments. vLLM has a larger ecosystem and broader hardware support; SGLang excels for agents, chat and large MoE models.
Can I switch between vLLM and SGLang easily?
Yes. Both expose OpenAI-compatible APIs, so client code usually only needs a different URL and port.
Which supports AMD GPUs?
Both support AMD Instinct GPUs with ROCm.
What is RadixAttention?
SGLang's method of storing KV caches in a radix tree so requests sharing a prefix automatically reuse previously computed attention states.
Sources and further reading
- Kwon et al., Efficient Memory Management for LLM Serving with PagedAttention (vLLM, 2023)
- Zheng et al., SGLang: Efficient Execution of Structured Language Model Programs (2023)
- Morph, SGLang vs vLLM (2026) (updated November 2026)
- DEV Community, vLLM vs SGLang vs LMDeploy: fastest LLM inference engine in 2026
- vLLM documentation and SGLang documentation




Leave a Reply