vLLM vs SGLang compared: prefix caching, scheduling, quantization and GPU support, published benchmarks with their setups, and which server fits your workload.
vLLM and SGLang are the two main open-source servers for running open-weight LLMs for many users at once. On unique prompts they benchmark within a few percent of each other. SGLang pulls ahead when requests share long prefixes, as in agents, RAG and multi-turn chat, thanks to RadixAttention. vLLM has the broader model, quantization and hardware-plugin coverage, and is the safer default when your traffic has no dominant shared prefix.
- v0.32.0 (Oct 18, 2026)
- v0.5.22 (Oct 19, 2026)
- Both Apache-2.0
- 1–4% (H100, 70B FP8)
Key takeaways
- On unique prompts, Spheron's H100 test put the two engines within 1–4% on throughput at every concurrency level.
- With 80% of requests sharing a 512-token system prompt, SGLang's median time to first token was about 40% lower than vLLM's at 100 concurrent requests.
- Most widely shared benchmarks compare mismatched versions; DeepInfra found one pairing releases about two years apart.
- vLLM lists the widest quantization set, including GGUF, and adds TPU, Gaudi, Ascend and Apple Silicon through plugins.
- Community reports agree that flags matter more than the engine: one memory gap disappeared once a context-length flag was set correctly.
What is the short answer?
For vLLM vs SGLang, pick by workload: SGLang when many requests share a long prefix, vLLM when you need the broadest model and hardware coverage or your prompts are mostly unique. Both are Apache-2.0, both expose an OpenAI-compatible API, and both target the same job: serving open-weight models to many concurrent users on GPUs. If you are one person on one card, you probably want neither; see Ollama vs llama.cpp vs vLLM.
| Your workload | Lean toward | Why |
|---|---|---|
| Agents and multi-turn chat with a fixed system prompt | SGLang | RadixAttention reuses the shared prefix and earlier turns; lower time to first token in cited tests |
| RAG with a shared instruction block | SGLang | Same prefix reuse; Spheron’s cut-off is roughly 60% of requests sharing a prefix |
| High-concurrency chat with unique prompts | Either; vLLM as default | Throughput within a few percent; vLLM has more docs and integrations |
| Brand-new model architecture on release day | vLLM | Usually lands first; widest model coverage per DeepInfra and Spheron |
| Heavy JSON / constrained decoding | SGLang, then test vLLM | SGLang’s xgrammar backend was built for it; vLLM also ships xgrammar and guidance |
| AMD Instinct (MI300X and later) | Either | Both support it; check that your quantization format has a ROCm kernel |
| TPU, Gaudi, Ascend | vLLM plugin, or SGLang’s TPU/Ascend backends | Both have paths; maturity varies by chip |
| Mixed consumer GPUs (e.g. a 5090 with a 4090) | Test carefully, or llama.cpp | A community report describes crashes and wrong kernel selection on mismatched ranks |
The rest of this page explains where those leanings come from, and how much of the evidence you should trust.
How do vLLM and SGLang differ under the hood?
The main difference is how each engine finds and reuses KV cache across requests, plus how much CPU work the scheduler hides behind the GPU.
vLLM started as the reference implementation of PagedAttention (Kwon et al., SOSP 2023). It stores the KV cache in fixed-size blocks, like virtual-memory pages, which the paper says brings KV cache waste to “near-zero” and improved throughput 2–4x over the systems of the time. Its prefix caching works on top of those blocks. The vLLM design doc says each block is hashed “by the tokens in the block and the tokens in the prefix before the block”. Only full blocks are cached, and eviction follows an LRU free queue.
SGLang was built around RadixAttention (Zheng et al.). Instead of discarding the cache when a request ends, it keeps prompts and generated outputs in a radix tree keyed by token sequence. A new request is matched against the longest prefix in that tree, and leaves are evicted LRU-first (LMSYS, Jan 2024). Because outputs stay in the tree too, turn 2 of a conversation can reuse turn 1’s reply without the client doing anything.
Other differences that show up in practice:
- Scheduler. SGLang’s v0.4 “zero-overhead” scheduler prepares the next batch on the CPU while the GPU runs the current one (LMSYS, Dec 2024). The gains it claims are largest on small models, where CPU overhead is a bigger share of each step.
- Routing across replicas. SGLang ships a Rust cache-aware router that sends requests to the worker most likely to hold their prefix. vLLM’s prefix cache is per instance, so with several replicas you need prefix-aware routing in front of them.
- Speculative decoding. vLLM’s README lists n-gram, suffix, EAGLE and DFlash methods. SGLang supports EAGLE and MTP, and its SpecForge project trains draft models for it.
- Structured output. vLLM uses xgrammar or guidance. SGLang added xgrammar in v0.4 and claimed JSON decoding “up to 10x faster” than other open-source options, without stating hardware.
What do published benchmarks show, and who ran them?
Published benchmarks show a near-tie on unique prompts and an SGLang lead on prefix-heavy traffic, but almost every widely shared number comes from a vendor or uses mismatched versions.
The cleanest recent comparison is Spheron’s (first published June 2026, updated Oct 19, 2026). Spheron rents GPUs and sells neither engine. Setup: one H100 SXM5 80GB, Llama 3.3 70B Instruct at FP8, vLLM v0.18.0 against SGLang v0.5.9, 200 prompts per run, a 60-second warmup and a 3-minute measurement window.
| Test (Spheron, H100, 70B FP8) | vLLM | SGLang |
|---|---|---|
| Unique prompts, throughput at 1 / 100 concurrent (tok/s) | 312 / 2,010 | 318 / 2,050 |
| Prefix-heavy, median TTFT at 10 concurrent (ms) | 142 | 98 |
| Prefix-heavy, median TTFT at 100 concurrent (ms) | 620 | 370 |
| Prefix-heavy cost per 1M tokens at 50 concurrent | $0.54 (prefix cache on) | $0.44 |
Read the other numbers in circulation with care:
- The “29% faster” figure. An AIMultiple test reported SGLang at 16,215 tok/s against vLLM at 12,553 on Llama 3.1 8B on one H100. DeepInfra points out that the most-cited comparison pairs SGLang v0.2.3 with vLLM 0.11.0, releases about two years apart. DeepInfra sells hosted inference, so it has its own angle, but the version critique checks out.
- SGLang’s own claims. “Up to 6.4x” (the paper) and “up to 5x” (Jan 2024 blog, against vLLM v0.2.5) come from the SGLang team, on workloads chosen to show prefix reuse. They are real results for those workloads, and they are also vendor-run.
- vLLM’s own claims. PagedAttention’s 2–4x was measured against FasterTransformer and Orca in 2023, not against SGLang.
DeepInfra’s broader point is worth keeping. Single-stream decode speed and aggregate server throughput are both reported as “tokens per second”, but they answer different questions. One Hacker News commenter made a related point about a separate benchmark: reusing the same input text can produce partial cache hits that make any engine look fast (HN, Sep 2026). Benchmark on your own request mix, at your real concurrency, with versions pinned.
We build CandorNo GPU? Use a hosted model
Uncensored AI, right in your browser.
Candor runs open models with refusals removed, so it answers the questions other assistants deflect. New accounts get free credits, no card needed.
Try Candor freeWhich models, quantizations and GPUs does each support?
vLLM has the wider official matrix, and SGLang has caught up on the hardware that most teams actually run.
| vLLM (v0.32.0) | SGLang (v0.5.22) | |
|---|---|---|
| NVIDIA | Yes, incl. Blackwell | Yes: B200/B300/GB200/GB300, H100/H200, A100, RTX 30/40/50 |
| AMD | Yes (ROCm) | Instinct MI300X, MI325X, MI350X, MI355X |
| Intel | GPUs, plus x86/ARM/PowerPC CPUs | Arc / Arc Pro B-series, Xeon CPUs |
| TPU, Ascend, Gaudi, Apple Silicon | Through hardware plugins | TPU v6e/v7, Ascend NPUs, Apple Silicon (Metal/MLX, PyTorch backend) |
| Quantization | FP8, MXFP8/MXFP4, NVFP4, INT8, INT4, GPTQ/AWQ, GGUF, compressed-tensors, ModelOpt, TorchAO | AWQ, gptq_marlin, GGUF, bitsandbytes, FP8/INT8 variants, ModelOpt FP4, MXFP4, compressed-tensors, Quark |
Sources: the vLLM README, the SGLang README and the SGLang quantization docs, all fetched Oct 28, 2026.
Two details catch people out. First, on AMD, SGLang’s docs say Marlin kernels “are CUDA-only”, so awq_marlin and gptq_marlin checkpoints won’t run there, and plain gptq has been removed on NVIDIA and AMD. Second, on consumer RTX cards, one Hacker News commenter who rewrote attention kernels notes that both engines fall back to FlashAttention-2, since FA-3 and FA-4 are datacenter-only (HN, Jul 2026). For format choice itself, see AWQ vs GPTQ.
How hard is each to deploy and operate?
Both are a single Docker image and an OpenAI-compatible endpoint away from serving. The operational difference is mostly in defaults and failure modes.
# vLLM
docker run --gpus all -p 8000:8000 vllm/vllm-openai:latest --model <hf-model-id>
# SGLang
docker run --gpus all -p 30000:30000 lmsysorg/sglang:latest \
python3 -m sglang.launch_server --model-path <hf-model-id> --host 0.0.0.0 --port 30000Points to plan for:
- Memory pre-allocation. vLLM reserves a fixed share of VRAM up front (
--gpu-memory-utilization, default 0.92 in the current docs). That is good for throughput and bad if something else shares the GPU. - API surface. vLLM also speaks the Anthropic Messages API and gRPC. Both projects added structured-decision endpoints in October 2026 releases (vLLM
/v1/systemone, SGLang/v1/decisionsand/v1/score). - Release churn. Both ship roughly every two weeks with breaking changes. vLLM v0.32.0 dropped Python 3.10, and SGLang v0.5.22 requires Python 3.11 or newer. Pin image tags.
- Startup time. Each release round is working on it: vLLM added
vllm preloadand a weight-cache daemon, and SGLang added a faster InstantTensor loader.
For the wider team setup (auth, quotas, which models to offer), see self-hosting an LLM server for a dev team.
What do developers report in practice?
Practitioners mostly report that configuration decides the result more than the engine does, and that SGLang’s edge is in tail latency rather than raw throughput.
- A flag erased a “memory win.” A developer comparing both on one A10 (24 GB) with Qwen2.5-7B first saw SGLang use 7 GB against vLLM’s 21 GB. After switching SGLang to the correct
--context-lengthflag, they wrote that memory use was “basically the same”. SGLang still did better in their test but showed a warm-up effect that vLLM didn’t (vLLM Forums, Apr 2025). - Throughput close, P99 TTFT not. In an r/LocalLLaMA thread, one user reported SGLang throughput slightly below vLLM’s on their setup, but a much lower P99 time to first token as concurrency rose (thread).
- Data parallelism on two GPUs. An r/LocalLLaMA user in March 2025 reported about 1,962 output tok/s with SGLang against about 770 with vLLM on two NVIDIA GPUs, crediting SGLang’s data parallelism. In the same comment they said an early DeepSeek-V3 gap had since closed (comment). vLLM has added similar data-parallel options since.
- Mixed hardware breaks things. A developer building their own engine wrote that both servers “easily crash on non-common setups”. Their example was pipeline parallelism across an RTX 5090 and an RTX 4090, where ranks get the wrong kernels because the engines assume identical devices (HN, Sep 2026).
- Settings change output, not only speed. Another HN commenter warned that “various tricky settings can impact throughput and model output quality” in both stacks (HN, Sep 2026).
These are individual community reports, not controlled tests. They are consistent with the published benchmarks, though: the two engines are close on raw throughput, SGLang does better on shared prefixes and tail latency, and misconfiguration produces most of the large gaps people see.
Where do TensorRT-LLM and llama.cpp fit?
TensorRT-LLM and llama.cpp sit on either side of these two. TensorRT-LLM is NVIDIA’s own engine. It is NVIDIA-only, and it is worth testing if you are committed to that hardware and can absorb a heavier build-and-tune step. llama.cpp is the opposite end: one binary, GGUF everywhere, good on CPUs, Macs and mismatched consumer cards, but not built for dozens of concurrent users. If your real question is llama.cpp or Ollama against vLLM, read Ollama vs llama.cpp vs vLLM. If it is whether to self-host at all, see self-hosting vs API cost.
FAQ
Is SGLang faster than vLLM?
Only on some workloads. On unique prompts, current tests put them within a few percent. With heavy shared prefixes, such as agents, RAG or multi-turn chat, SGLang had about 40% lower median time to first token at 100 concurrent requests in Spheron’s H100 test.
Does SGLang use less memory than vLLM?
Not inherently. Both pre-allocate a share of VRAM for the KV cache. Reported memory gaps usually come from different context-length or memory-fraction settings, as one A10 comparison found once its flags were corrected.
Which is better for a single GPU at home?
For one user, neither is usually the best fit; llama.cpp or Ollama is simpler. If you need concurrency on one card, both run on RTX 30/40/50 GPUs, and the choice comes down to your quantization format and whether your prompts share prefixes.
Can vLLM and SGLang run GGUF models?
Yes, both list GGUF support. Throughput-oriented formats such as AWQ, FP8 or NVFP4 are the more common choice on these servers, because their kernels are better optimized.
Should I benchmark both before choosing?
Yes, if the traffic justifies it. Pin both versions, replay your real request mix at production concurrency, and measure time to first token and per-user decode speed separately from aggregate throughput.
We build CandorSkip the setup
Want an uncensored model without hosting one?
Candor (candorai.dev) is an uncensored AI chat app that runs in your browser: it answers the questions mainstream assistants dodge, on health, money, law and work, without the lecture. New accounts get free credits, no card needed.
Facts from candorai.dev, checked Nov 10, 2026. Candor never changes how we rank or review models. Disclosure.
Sources (10)
- Efficient Memory Management for Large Language Model Serving with PagedAttention, Kwon et al., SOSP 2023 (arXiv 2309.06180)
- SGLang: Efficient Execution of Structured Language Model Programs, Zheng et al. (arXiv 2312.07104)
- vLLM README and releases, GitHub (fetched Oct 28, 2026)
- SGLang README and releases, GitHub (fetched Oct 28, 2026)
- vLLM docs: automatic prefix caching design
- SGLang docs: quantization
- LMSYS: SGLang v0.4, zero-overhead batch scheduler and cache-aware load balancer (Dec 4, 2024)
- Spheron: vLLM vs SGLang 2026, RadixAttention vs PagedAttention benchmarks (updated Oct 19, 2026)
- DeepInfra: vLLM vs SGLang (Aug 4, 2026)
- vLLM Forums: performance test of vLLM vs SGLang on an A10 (Apr 28, 2025)
Written by Refusal Rate editors from papers, model cards, official docs and pricing pages. Anything we ran ourselves is labeled as our own test, with the hardware and settings. Our method.