Before you start: words you need#
| Word | Plain meaning |
|---|---|
| Model server | A program that hosts many models of any kind (vision, embeddings, LLMs) behind one API, with versioning and metrics. Not tied to one engine. |
| Backend (Triton) | A plug-in that teaches Triton to run one kind of model: ONNX Runtime, TensorRT, PyTorch, Python, vLLM, TensorRT-LLM. |
| Ensemble | A chain of models run server-side for one request, such as tokenizer → model → post-processor. |
| Dynamic batching | Holding requests for a few milliseconds to group them into one batch. Right for fixed-size models; LLMs need continuous batching instead (12.i, 12.j). |
| ONNX | Open Neural Network Exchange: a file format that describes a model as a graph of standard operators, so many runtimes can execute it. |
| Execution provider (EP) | ONNX Runtime’s plug-in for one kind of hardware: CPU, CUDA, TensorRT, CoreML, OpenVINO, QNN, WebGPU and others. |
| Maintenance mode | A project still available but no longer developed: no new features, few or no fixes. |
1. What is it?#
Three more serving systems, each built for a different problem. Knowing what each was built for is more useful than a feature checklist.
TGI (Text Generation Inference) Hugging Face's LLM server: a Rust router in front of
Python model shards. Archived in March 2026.
NVIDIA Triton Inference Server A general-purpose model server: any framework, any
modality. Not LLM-specific; hosts vLLM and
TensorRT-LLM as backends.
ONNX Runtime A cross-platform runtime for ONNX models. Strong on
CPU, edge devices and non-NVIDIA hardware; the usual
home for the small models around an LLM.Versions on 12 November 2026: TGI v3.3.7 (19 December 2025, final), Triton v2.74.0 (NGC container 26.10), ONNX Runtime v1.31.1, ONNX Runtime GenAI v0.19.0. Facts checked on 12 November 2026.
2. Why does it matter?#
An LLM platform runs more than the LLM. A retrieval-augmented chat product also needs an embedding model, a reranker, perhaps a safety classifier, a speech-to-text model and an image encoder. Running every one of them through an LLM engine is awkward, and running each in its own hand-written service is a lot to operate. Triton and ONNX Runtime answer that problem.
TGI matters for a different reason: you will meet it in existing systems, it must be migrated, and its history teaches a criterion that benchmarks never show.
3. Simple analogy#
- TGI is a restaurant that closed: the building is still there and some people still eat the leftovers, but nobody is cooking new food.
- Triton is a food court: one building, one entrance and one bill, with a separate kitchen (backend) for each cuisine.
- ONNX Runtime is a food truck: small, cheap, goes anywhere (laptop, phone, browser, factory floor), and perfect for snacks (small models), not banquets.
4. Tiny example: an embedding model in Triton#
A Triton model repository is a directory. Each model has a folder, a config.pbtxt and
numbered version folders:
models/
embedder/
config.pbtxt
1/
model.onnx# models/embedder/config.pbtxt
name: "embedder"
backend: "onnxruntime"
max_batch_size: 64
input [ { name: "input_ids", data_type: TYPE_INT64, dims: [ -1 ] },
{ name: "attention_mask", data_type: TYPE_INT64, dims: [ -1 ] } ]
output [ { name: "embedding", data_type: TYPE_FP32, dims: [ 768 ] } ]
dynamic_batching { max_queue_delay_microseconds: 2000 }
instance_group [ { kind: KIND_GPU, count: 2 } ]docker run --gpus all -p 8000:8000 -p 8001:8001 -p 8002:8002 \
-v $PWD/models:/models nvcr.io/nvidia/tritonserver:26.10-py3 \
tritonserver --model-repository=/modelsPort 8000 is HTTP, 8001 gRPC, 8002 Prometheus metrics. The dynamic_batching block waits up to
2 ms to group requests into one batch, the right strategy for a model whose every request costs
the same. Two instances of the model share the GPU.
5. Technical explanation#
TGI: Text Generation Inference#
warning
TGI is no longer developed. Hugging Face put it into maintenance mode in December 2025 (final release v3.3.7) and archived the repository in March 2026; its documentation points users to vLLM or SGLang. Do not start a new deployment on it.
Its design is still worth knowing:
┌─────────────────────────────────────┐
│ ROUTER (Rust) │ ← the distinguishing choice
│ HTTP, validation, tokenisation │
│ batching decisions, queue │
│ streaming, per-request state │
└──────────────┬──────────────────────┘
│ gRPC
┌──────────────▼──────────────────────┐
│ SHARD(s) (Python) │
│ model execution, one per TP rank │
│ paged attention, CUDA graphs │
└─────────────────────────────────────┘Everything CPU-bound and latency-sensitive (HTTP parsing, tokenising, batching logic, streaming) ran outside Python, so it never fought the model process for Python’s global interpreter lock (16.d). vLLM’s experimental Rust frontend (19.h) and SGLang’s Rust gateway follow the same idea today.
TGI was a pragmatic choice for years: production-hardened behind Hugging Face’s own endpoints, good observability, tight Hub integration, and support beyond NVIDIA (AMD, Intel Gaudi, AWS Neuron).
Triton Inference Server#
note
NVIDIA now presents Triton as part of its Dynamo platform (“Dynamo-Triton”). Dynamo itself (v1.6.2, 5 November 2026) is an LLM-specific distributed serving layer: router, planner, KV cache management and prefill/decode disaggregation over vLLM, SGLang or TensorRT-LLM workers. Triton remains the general-purpose model server described here; Dynamo answers “many GPUs, one LLM service” (14.j, 21.j).
Triton hosts models through backends: TensorRT, ONNX Runtime, PyTorch (LibTorch), OpenVINO,
Python (any Python code), RAPIDS FIL (tree models), DALI (GPU data loading), and the LLM backends
vllm and tensorrtllm. The features that matter:
- Ensembles and business-logic scripting. Chain models server-side: tokenizer (Python backend) → LLM → detokenizer, or image pre-processing (DALI) → vision encoder → classifier. One request, one network round trip.
- Dynamic batching for non-autoregressive models, mature and well tuned.
- Model repository and versioning. A filesystem or object-store layout with explicit versions, load and unload policies and a model-control API.
- Concurrent model execution. Several models, and several instances of each, on one GPU.
- Metrics. Per-model, per-version Prometheus metrics.
For LLMs, Triton adds little over the engine inside it: the vllm backend runs vLLM’s own
engine, and the tensorrtllm backend runs TensorRT-LLM (now on its PyTorch path, 15.c).
ONNX Runtime#
A cross-platform runtime with a graph optimiser and pluggable execution providers:
CPU (MLAS kernels, Arm KleidiAI) very good; the main reason to use ONNX Runtime
CUDA, TensorRT NVIDIA GPUs (CUDA now also ships as a separate plug-in EP)
DirectML, WebNN Windows and browsers
CoreML Apple GPU and Neural Engine
OpenVINO Intel CPUs, GPUs and NPUs
MIGraphX AMD GPUs
QNN Qualcomm NPUs (phones, Copilot+ PCs)
WebGPU / WebAssembly browsersONNX Runtime GenAI adds the LLM loop on top: tokenisation, sampling, a KV cache and an “Engine” API with a paged KV cache and, since v0.17 (September 2026), prefix caching. It powers on-device LLMs (Windows, Foundry Local, phones) well. It is not built or used for multi-tenant cluster serving at the scale of vLLM or SGLang.
6. Under the hood: what each system teaches#
vLLM → memory management is the bottleneck; solve it with paging
SGLang → workload structure is exploitable; represent it explicitly
TGI → keep the CPU-bound path out of Python
and: an engine's maintenance trajectory matters as much as its speed
TRT-LLM → a few excellent kernels beat whole-graph compilation for LLMs
Triton → a platform serving many model types needs a different abstraction
ORT → portability and CPU efficiency are their own valueReading the source of more than one of these is one of the best uses of your time in this material. They solved the same problem with different priorities.
The comparison#
The TGI column describes its final release; it is frozen there. Ratings are directional and drift with releases.
vLLM SGLang TGI TRT-LLM Triton ORT (+GenAI)
LLM continuous batch ✓✓ ✓✓ ✓✓ ✓✓ via bkend ✓ (on-device scale)
Paged KV ✓✓ ✓✓ ✓✓ ✓✓ via bkend ✓
Prefix caching ✓✓ ✓✓✓ ✓ ✓✓ via bkend ✓
Peak LLM throughput ✓✓ ✓✓ ✓ ✓✓✓ via bkend ✗
New-model speed ✓✓✓ ✓✓ ✗ ✓✓ via bkend ✓
Ease of deployment ✓✓✓ ✓✓ ✓✓ ✓✓ ✓ ✓✓
Structured output ✓✓ ✓✓✓ ✓✓ ✓✓ via bkend ✓
Non-LLM models ✗* ✗* ✗ ✗ ✓✓✓ ✓✓✓
Non-NVIDIA hardware ✓✓ ✓✓ ✓✓ ✗ ✓ ✓✓✓
CPU inference ✓ ✗ ✗ ✗ ✓✓ ✓✓✓
Still developed ✓ ✓ ✗ ✓ ✓ ✓
* vLLM and SGLang serve embedding, reranking and some diffusion models,
but not arbitrary vision or tabular models.7. Performance implications#
- Supporting models on CPU. An embedding or reranking model of 100–600M parameters often runs well on CPU with ONNX Runtime and INT8 weights. Moving it off the GPU frees that GPU for the LLM, which is usually the better use of it. Measure: at high request rates, a small GPU slice may still be cheaper.
- Dynamic batching delay is a direct latency cost:
max_queue_delay_microsecondsis added to the worst-case latency of every request. Set it from your latency budget, not by default. - Triton’s own overhead is small (tens of microseconds per request), but an ensemble with a Python-backend tokenizer adds Python’s costs back. For LLMs, let the engine tokenise.
- ONNX export can lose fusions. A model exported naively may run slower in ORT than in PyTorch until graph optimisations or the right EP are enabled. Compare after optimisation.
8. Production implications#
TGI archived: no new models, features or security fixes. Plan the migration;
do not adopt. Both TGI and its successors speak the OpenAI-compatible
API, so clients rarely change; re-check sampling defaults, chat
templates, stop sequences and dashboards (metric names differ). 15.f
has the migration checklist.
Triton budget time for config.pbtxt, the model repository and instance groups;
excellent for a heterogeneous platform; one more layer for a single LLM.
ORT export is the hard part (operator-set support, dynamic shapes); verify
numerics after export; excellent for the supporting-model tier.9. Common mistakes#
- Using Triton for a single LLM and paying the operational overhead for nothing.
- Using ONNX Runtime GenAI for multi-tenant cluster LLM serving. It is built for on-device and single-machine use.
- Running embedding and reranking models on GPUs with a heavyweight server when ONNX Runtime on CPU would be cheaper and free the GPU.
- Assuming feature parity. Check your model and feature against the exact version.
- Starting a new project on TGI because an old tutorial recommends it.
- Choosing on benchmarks alone. Operational fit matters more over a year.
10. Hands-on exercise#
- Two ways. Serve the same small LLM with vLLM directly and with Triton’s
vllmbackend. Compare setup time, configuration size, throughput, p95 latency and the metrics each exposes. - Triton ensemble. Build an ensemble of a Python-backend tokenizer, an ONNX embedding model and a Python-backend normaliser. Measure latency against tokenising on the client.
- ORT for supporting models. Export an embedding model to ONNX, quantize it to INT8 and serve it with ONNX Runtime on CPU. Compare throughput and cost per million embeddings with the same model on a GPU.
- Dynamic batching. In the tiny example, set
max_queue_delay_microsecondsto 0, 2,000 and 10,000. Plot throughput and p99 latency at a fixed request rate. - Read one. Read TGI’s Rust router or Triton’s dynamic batcher. Explain one design decision it made differently from vLLM, and why.
11. Interview questions#
- Why did TGI put its router in Rust? What does that buy, and who does it today?
- What is Triton, and when would you choose it over running vLLM directly?
- What is a Triton ensemble, and what problem does it solve?
- Where does ONNX Runtime fit in an LLM serving platform?
- Why is dynamic batching right for an embedding model but not for an LLM?
- What lesson does TGI’s archiving teach about choosing an engine?
12. Further reading#
Checked on 12 November 2026.