Inference Servers: The Invariant Functions (vLLM, TGI, Triton, SGLang)
A Warning, Up Front
The tool names on this page age in months. The functions they perform have not changed since 2023 and will not change soon.
So this lesson is built the other way round from usual: first the list of things an inference server has to do, which stays true as the names rotate; then, briefly, who does what today; and finally (the most useful part) how to read a comparison number between two of these tools. Because in this field most of the numbers in circulation mean nothing until you know what they were measured against.
The Challenge: Serving Is Not Running
Running a model on your machine is easy: one line of code and it answers. In production the problem is different. A hundred people send requests at once, each expects an answer within seconds, each has a different text length, and your graphics card has a fixed amount of memory.
A bare model knows nothing about any of that. It knows how to produce one more token. Everything else (who goes when, who shares the card with whom, what happens when memory fills up) has to be built around it. That is the inference server's job.
The Six Invariant Functions
Here is what any serious inference server must provide. This list is the real content of the page: it gives you a grid to read any tool through, including the one that does not exist yet.
1. Queueing. Requests arrive whenever they like, often in bursts. You have to accept them, order them, decide who is served first, and reject cleanly when the queue exceeds what the server can absorb, rather than letting everything slow to uselessness.
2. Continuous batching. This is the most important function and the least intuitive. Grouping several requests to process them together sharply increases tokens produced per second, for reasons set out in full in Continuous batching, and the word continuous means a finished request is replaced immediately, without waiting for its neighbours. That lesson also gives the quantified trade: filling the batch raises total throughput and degrades every user's per-token time. We do not repeat that reasoning here, but it is the heart of the matter.
3. Attention-cache memory management. Every in-flight request holds a KV cache (the attention keys and values already computed, see the KV cache), which grows with every token produced. Unlike the model weights, whose size is known in advance, this cache is unpredictable: it depends on the lengths of the texts in flight. It is almost always the cache, not the weights, that decides how many requests fit on the card at once. So a server has to allocate it finely, release it fast, and know what to do when there is no room left: pause a request, or move its cache elsewhere.
4. Monitoring. Token throughput, queue length, memory occupancy, and above all two distinct latencies that must never be conflated: time to first token (TTFT), the wait before the answer starts, and time per subsequent token, which sets how fast the text scrolls. These two numbers move in opposite directions as you fill the batch; a server that exposes only one of them is hiding half the problem from you.
5. Model versioning. A model in production will be replaced. You need to serve two versions side by side, shift traffic gradually, and roll back if the new one is worse. This is an operations requirement rather than a performance one, and it is the one most often forgotten at selection time.
6. A stable interface. In practice nearly every server today exposes an interface modelled on OpenAI's. That is not a technical choice but a network effect: it is what all the client tooling already knows how to call. The practical consequence is that switching servers usually costs less than people fear.
Faced with a new tool, do not go looking for what makes it unique. Walk the six points and ask, for each: does it do this, how, and what happens when the load exceeds what it planned for? Those six answers will tell you more than any comparison table.
How to Read a Comparison Number
This is the point to be uncompromising about, because numbers in this field are almost always quoted without their baseline, and without a baseline, a speedup factor means nothing.
Take the two most-repeated numbers about vLLM.
The vLLM paper claims 2 to 4 times the throughput. Against what? Against Orca and FasterTransformer, described in the paper as the state of the art of the day. And that is what makes the number impressive: Orca already does continuous batching. So the 2-to-4 factor measures what paged cache-memory management alone buys, once continuous batching is in place on both sides. The paper adds that the gap widens with longer sequences, larger models and more complex decoding strategies, in other words it is not a single factor but a range that depends on the load.
An Anyscale blog post claims up to 23 times. Against what? Against naive static batching, implemented with the Hugging Face library's pipelines. The same post gives the intermediate rungs, and they are illuminating: roughly 4 times for FasterTransformer, roughly 8 times for continuous batching on its own, up to 23 times for continuous batching plus vLLM's memory optimisations.
2 to 4, and 23. This is not a contradiction, and neither is false: they do not measure the same thing.
The 23 starts from the very bottom (a server that waits for all the requests in a batch to finish before accepting new ones) and stacks two improvements. The 2-to-4 starts from a competitor that has already absorbed the first of those two, and credits vLLM only with the second.
Hence the only rule that matters: a speedup factor without its baseline is an empty number. When you see "8 times faster", the question is not "is that true?" but "relative to what, on which model, at what text length, and under what latency constraint?". Without those four qualifiers the number supports no decision at all.
A table that lines up four engines against a "speedup" column without saying which starting point each was measured from is, for that reason, unusable, and often assembled by copying the figure each project quotes against its own baseline.
Who Does What, in 2026
Four tools keep coming up. What follows describes their positioning, which moves slowly, not their performance, which moves fast.
vLLM
Born at Berkeley, it is the most widely used. Its original contribution is PagedAttention: cutting the attention cache into small fixed-size pages, the way an operating system manages memory, instead of reserving in one block enough room for the longest text imaginable. Each request then consumes only the pages it actually occupies. The mechanism has its own lesson: PagedAttention.
The right image is a meeting room. Without paging you book a 100-seat room for a meeting that might turn out to be 10 people or 100; with paging you add chairs as people arrive.
One consequence leads to another: once the cache is made of independent pages, two requests that begin with the same text can share the pages of that common opening. This is prefix caching: if twenty people ask questions about the same document, that document is computed once.
# The options that matter: which model, across how many cards,
# and what maximum context length.
vllm serve <model> \
--tensor-parallel-size 2 \
--max-model-len 32768
Option names change between versions, and some functions move from an explicit flag to a default behaviour. Read these lines as an indication of the decisions you have to make (the model, the number of cards, the context length) not as syntax to copy. Always check against the documentation for the version you install.
TGI
TGI (Text Generation Inference) is Hugging Face's server. Its selling point is not peak performance, it is the shortest path from a model published on the Hub to a production endpoint: one container image, one model identifier, a number of cards.
docker run --gpus all -p 8080:80 \
ghcr.io/huggingface/text-generation-inference:latest \
--model-id <model> \
--num-shard 2
Here --num-shard 2 splits the model across two cards, and -p 8080:80 exposes the container's port 80 on your machine's port 8080.
NVIDIA Triton
Triton is not a language-model server: it is NVIDIA's general-purpose one. On a single machine it will serve a language model, an embedding model (see text embeddings), an image classifier, a detection model, each with its own execution engine.
Its strengths are precisely invariants 4, 5 and 6 above: monitoring, versioning, progressive rollouts. It is an operations product.
Its weakness is the direct counterpart: you must declare each model explicitly (its engine, its inputs, its outputs) in a configuration file in config.pbtxt format (structured text, with a fairly dry syntax). For a single language model, that rigour is a cost with nothing on the other side.

SGLang
Also out of Berkeley, SGLang targets chains of calls, agents, reasoning trees, long conversations. Its contribution is RadixAttention: holding the attention caches of all in-flight requests in a prefix tree (a radix tree), so that any opening text shared by several calls is stored and computed only once.
It is the same principle as prefix caching, pushed further: instead of recognising a shared prefix when a request arrives, the tree structure maintains it permanently and keeps it alive across calls.

A second argument, often decisive in practice: constrained generation. Forcing the model to emit valid JSON, or text matching a pattern, not by asking it politely but by mechanically forbidding, at every token, the ones that would make the output invalid. For software that has to read that output afterwards, the difference between "almost always valid" and "valid by construction" is the difference between a system that works and a system held together with patches.
Zheng et al. (2023), SGLang: Efficient Execution of Structured Language Model ProgramsEngines built for a single model
At the opposite end from these generalists, some labs publish the engine they use for their own models. The emblematic case is DeepInfer, opened by DeepSeek on October 20, 2026: derived from vLLM, limited to a single model, with no web server or shared cache, but with all the production optimizations. It is not a competitor to vLLM or SGLang, it is a reference for what you gain when model and engine are designed together, see DeepInfer.
The Comparison Table This Page Does Not Contain
You may have expected a four-column table here, scoring each tool on each criterion. There is none, and that is deliberate.
Such a table has three faults you cannot fix. It is out of date on publication, because these projects ship monthly. It aggregates the unaggregatable: "performance: very good" means nothing without saying at what context length, at what concurrency, and under what latency constraint. And it stacks numbers measured against different baselines, which is exactly the mistake taken apart above.
What does stay true for more than a year is the positioning, and that fits in four lines of prose. vLLM is the default choice, with the largest community and the most documentation. TGI is the shortest path if your models already live on the Hugging Face Hub. Triton is the right call when you serve several kinds of model and need the operational invariants. SGLang is the right call when your load consists of many calls with shared prefixes and structured outputs.

How to Choose, Concretely
Take vLLM or TGI, whichever documentation speaks to you. Run your workload: your text lengths, your concurrency, your latency constraint. Measure the two latencies separately, time to first token and time per subsequent token.
Only switch in response to an identified need: a need for agents with shared prefixes points to SGLang, a fleet of heterogeneous models to Triton, an extreme latency constraint on NVIDIA hardware to TensorRT-LLM and its compilation step.
The real trap is not choosing badly: the six invariants are covered by every serious candidate, and the shared interface makes switching cheap. The real trap is spending three weeks comparing tables instead of measuring for one day on your own data.
For production deployment itself (sizing, scaling, fault tolerance) see Deploying a model in production.
1. The vLLM paper reports 2 to 4 times more throughput, while a blog post reports up to 23 times. Who is wrong?
2. On a given card, what almost always decides how many requests can be served at the same time?
3. Why must a server expose time to first token and time per subsequent token as two separate metrics?
4. Your workload: agents chaining dozens of calls sharing the same long prefix, with outputs that must be valid JSON. Which tool does this need point to?
5. Why does this page refuse to provide a table grading the four engines column by column?