Inference serving comparison
vLLM vs SGLang: Start with the serving workload
A deployment-oriented comparison for teams choosing an open-model serving layer, without reducing the decision to a single throughput chart.
Original comparison: July 22, 2026 · Editorial update: November 14, 2026
vLLM and SGLang serve AI models, but the practical choice depends on the specific model, hardware and request mix. A simple chat endpoint, high-concurrency retrieval pipeline and agent with structured multi-step generation can stress different parts of a serving stack.
Both projects document OpenAI-compatible interfaces and caching capabilities. Those descriptions do not establish identical endpoint behavior, model support or performance in a particular release. Check the features your application needs against the versions and accelerator you plan to use.
Benchmark the full request path, including tokenization, queueing, cache policy, observability and recovery. A repeatable procedure follows below; this article does not claim a winner because it does not contain a controlled performance experiment.
Editorial update · November 14, 2026
Choose a workload before choosing a server
vLLM and SGLang are inference-serving projects. A useful comparison must specify the model, hardware, software versions and workload. Public throughput figures gathered under different conditions cannot establish which system will be faster or cheaper for your application.
Test the features your application actually uses: model and quantization support, API compatibility, structured output, caching, observability and upgrade behavior. A documented feature is not proof that every model, accelerator or configuration supports it.
How do API compatibility and caching change the test?
Both projects document OpenAI-compatible serving interfaces, but endpoint support, parameters, models and behaviors must be checked against the exact release and client you plan to use. A compatible request shape does not guarantee identical output or support for every API feature.
vLLM documents automatic prefix caching that reuses cached computation for a shared prefix; SGLang describes prefix caching using RadixAttention. Cache benefit depends on how much context requests share, cache capacity and the workload. Benchmark both cold and warm runs with a clearly stated cache policy rather than attributing a warm-cache gain to the model alone.
Separate latency, throughput and operating cost
Time to first token matters for an interactive user; total completion time and p95 latency show different aspects of the experience. Throughput is useful for capacity planning but can improve while individual requests wait longer. Report all three with the actual request mix and concurrency.
For cost per successful request, include the machine cost over the measurement window and divide by completed, accepted requests. State whether idle time, model loading, network, retries and operations are included. A cheaper GPU-hour is not automatically a cheaper accepted task.
Design a repeatable benchmark
Pin the model revision, quantization, GPU type and count, driver, runtime and server versions. Use the same prompt and output length distribution, concurrency, warm-up and cache policy. Report the number of requests and failed or timed-out requests alongside successful output.
Measure time to first token, end-to-end latency including p95, output tokens per second, memory use and throughput under the same load. Calculate infrastructure cost per successful request, noting idle capacity and any excluded expenses. Repeat runs and retain configuration and logs so another operator can reproduce the result.
No performance test was run for this article. The framework above is a decision procedure, not evidence that either server wins.