One model, many engines You want to serve an open model behind an API. vLLM, SGLang, TensorRT-LLM, Hugging Face TGI, llama.cpp and Ollama can all load it, and each project shows charts where it wins.
The engine is the program that holds the weights in accelerator memory, schedules requests and generates tokens. The choice decides latency, cost per token, which hardware you can use and what you operate.
They all speak an OpenAI-compatible API Almost every engine exposes an OpenAI-compatible HTTP API, with routes such as /v1/models and /v1/chat/completions and streaming over server-sent events. vLLM, SGLang, TensorRT-LLM (trtllm-serve), llama.cpp (llama-server) and Ollama all do.
A client can switch engines by changing the base URL. Support for extras differs, though: tool calling, structured output parameters, logprobs and newer routes are not the same everywhere.
Key idea Code against the common subset of the API and test the extra features you need on each engine. Then swapping engines is a config change.
They share the same core ideas Continuous batching adds and removes requests at every decode step, so the accelerator stays busy. A paged KV cache stores attention keys and values in fixed-size blocks, so memory is not reserved for the longest possible answer.
Prefix caching keeps the KV blocks of a shared start, like a long system prompt, and reuses them for the next request. vLLM calls its design PagedAttention and SGLang calls its prefix cache RadixAttention.
Key idea These ideas are table stakes now. An engine without them is not a fair alternative for a busy multi-user service.
vLLM and SGLang: broad, open and fast-moving vLLM supports a very wide range of models and hardware. It runs on NVIDIA, AMD and Intel GPUs and CPUs, and hardware plugins add Google TPUs, Intel Gaudi, Huawei Ascend and others.
SGLang puts a lot of work into its scheduler and prefix cache, and is strong for workloads that share long prefixes, such as agents and multi-turn chat. It also runs on NVIDIA and AMD GPUs, TPUs, NPUs and CPUs. Both offer structured output, tensor and expert parallelism, multi-node serving and prefill-decode disaggregation.
Key idea Check the support matrix for your exact model and accelerator. Day-one support for a new model and its quantized variants differs between engines and releases.
TensorRT-LLM, Triton and Dynamo: the NVIDIA stack TensorRT-LLM is an NVIDIA library with kernels tuned for NVIDIA GPUs. It serves through trtllm-serve or through the TensorRT-LLM backend of Triton Inference Server, a general server that also hosts non-LLM models.
NVIDIA Dynamo sits one level higher. It does not replace engines. It coordinates SGLang, TensorRT-LLM or vLLM workers across many nodes with disaggregated serving, KV-aware routing and KV cache tiers.
Key idea TensorRT-LLM runs on NVIDIA GPUs only. It can be very fast there, but you trade portability, and the setup has more moving parts.
Hugging Face TGI is in maintenance mode Text Generation Inference powered Hugging Face products for years. Its README now says it is in maintenance mode: the project accepts minor bug fixes, docs and light maintenance, and recommends vLLM and SGLang, or llama.cpp and MLX for local use.
Existing TGI deployments keep working. New models, hardware and features will land in other engines first, so a new service should not start on TGI.
Watch out Check the status of any project before you depend on it: the README, recent releases and commits. Maintenance mode is a reason to plan a migration, not an emergency.
llama.cpp and Ollama: one machine, many devices llama.cpp runs GGUF models on CPUs and on Apple, NVIDIA, AMD and other GPUs, often with aggressive quantization. llama-server gives it an OpenAI-compatible endpoint. Ollama wraps local models in a simple pull-and-run tool with its own API and an OpenAI-compatible one.
They shine on laptops, edge boxes and small internal tools. They are not built for many concurrent users on a GPU cluster, so do not compare their throughput with vLLM on the same chart.
Most published comparisons do not fit your case Engine A runs the model in FP8 on newer GPUs, engine B runs BF16 on older ones. Prompts are 100 tokens, while yours are 4,000. Only peak throughput at maximum batch size is reported. The winner says little about your service.
Defaults also differ: maximum batch size, KV cache memory share, chunked prefill, prefix caching on or off. A tuned engine against an untuned one measures the tuning, not the engine.
Watch out Never pick an engine from a chart that does not state model, precision, hardware, parallelism, input and output lengths, and concurrency.
Fair comparison: same setup, your workload, your SLO Fix the model, weights, precision, hardware and parallelism. Replay your real distribution of input and output lengths and prefix sharing. Sweep concurrency or request rate from low to high.
At each load, measure TTFT (time to first token), TPOT (time per output token) and output tokens per second, at p50 and p99. Then read off the highest load where p99 TTFT and TPOT still meet your SLO. That goodput is what you pay for.
Key idea Tools like vllm bench serve work against any OpenAI-compatible server and can report goodput for given TTFT and TPOT limits, so one harness can test every engine.
On Kubernetes the engine is a container image The simplest setup is a Deployment that runs the engine image with a GPU request, a readiness probe on its health route, and a Service in front. KServe adds a model-serving API and LLM-specific resources on top, with vLLM and llm-d as backends.
llm-d targets large clusters. It runs vLLM or SGLang behind an inference gateway with prefix-cache and load-aware routing, plus prefill-decode disaggregation. Dynamo offers a similar operator for its own stack.
Key idea Keep the engine swappable: same API, same health checks, same metrics dashboards. Then a better engine next year is a rollout, not a rewrite.
Shared basics, real differences, and your own numbers Modern engines share an OpenAI-compatible API, continuous batching, a paged KV cache and prefix caching. They differ in scheduling, structured output, model and hardware support, multi-node features and how much there is to operate. TGI is in maintenance mode, and local engines solve a different problem.
A fair benchmark keeps everything equal except the engine, uses your workload and reports TTFT, TPOT and throughput at your SLO.
Summary Shortlist by hardware and model support, decide by goodput on your own traffic, and keep the engine replaceable behind one API.