Overview
When to serve a model with a prebuilt NIM, and when to deploy Triton Inference Server and a TensorRT-LLM engine instead.
NIM and Triton both serve models on OpenShift. They are not substitutes. A NIM is a prebuilt container for one model family: the runtime, the API and a known configuration, pulled and run. Triton Inference Server is a server you put your own model into. TensorRT-LLM is how you compile an LLM into an engine Triton or its own server can run, when you need the throughput a generic runtime did not give you.
Start with a NIM when one exists for the model. Move to Triton when it does not, or when the request has to pass through your own pre-processing and post-processing in one hop. This page is the choice. The other three labs are the work.
The choice
| You have | Serve it with |
|---|---|
| A model NVIDIA already publishes as a NIM: Llama, Nemotron, an embedding model, a reranker | A NIM. The NeMo overview uses these for the chatbot |
| An ONNX or Torch model you trained or exported | Triton on OpenShift |
| An LLM with freely downloadable weights, and a measured reason to beat a plain runtime | TensorRT-LLM, compared with vLLM on the same hardware |
| A string in, a label out, with tokenising and decoding that clients should not repeat | A Triton ensemble |
| Several models that must be versioned, batched and metered together | Triton, one model repository, one metrics port |
A NIM is still the right serving path for a LoRA adapter produced by NeMo Customizer, as long as the base model is one the NIM loads. Compiling that adapter into a TensorRT-LLM engine is a later optimisation, after Evaluator has shown the adapter is worth serving.
What you give up with each
A NIM hides the batching, the KV cache and the HTTP shape. You give up the ability to insert your own code between the request and the weights. If the model needs a custom tokenizer step, a business rule, or a second model on the same request, you are working around the NIM. That is the moment to put the steps in a Triton ensemble instead of in every client.
Triton hides very little. You write a config.pbtxt, you choose the batch size, and you own the model repository. The compensation is that ONNX, PyTorch, TensorRT and Python backends share one server, one readiness probe and one Prometheus endpoint.
TensorRT-LLM spends time up front. An engine is built for a maximum batch and a maximum sequence length, and a request that exceeds them is rejected. vLLM will serve the same weights with less preparation and a more forgiving limit. The TensorRT-LLM lab measures both on your GPU. A number from someone else's machine is not a reason to switch.
What runs in the lab
| Component | Role |
|---|---|
| OpenShift | Schedules the server pods and exposes a Route or a Service |
| NVIDIA GPU Operator | Provides nvidia.com/gpu so the pod lands on a machine with a device |
| NIM | Default serving path for models NeMo Retriever and the chatbot already use |
| Triton | Custom ONNX, PyTorch and ensembles |
| TensorRT-LLM | Engines for an open-weight LLM, served beside vLLM for the comparison |
| vLLM | The plain baseline in the TensorRT-LLM lab |
All of these are Deployments. None of them need a different cluster from the NeMo workloads. They do need a GPU that the model fits in, and a model repository on a volume that survives a pod restart.
A request, either way
Clients in this series speak the OpenAI chat API to NIMs and to vLLM. Triton speaks its own HTTP and gRPC API on ports 8000 and 8001, plus metrics on 8002. An ensemble can present a simple string in and a string out, which is what application code should see. Keep that client API stable when you change the engine behind it. The point of the comparison lab is that you can move the weights from vLLM to a TensorRT-LLM engine without rewriting the application, as long as both expose the same endpoint.
oc get pods -A -l app=triton
oc get pods -A -l app.kubernetes.io/name=nim
If both are empty, start with Triton on OpenShift. If a NIM is already answering the chatbot, stay there until you have a model it cannot load.
Decide from a measurement
Switching runtimes because a blog said one is faster is how you spend a week on an engine the traffic does not need. Before you leave a NIM, write down the limit you are missing:
| Limit you hit | What to do |
|---|---|
| The model is not published as a NIM | Triton, with your ONNX or Torch file |
| Latency at the concurrency you actually serve is too high, on a NIM or on vLLM | Build a TensorRT-LLM engine and compare it on the same GPU |
| Every client reimplements tokenising or a label map | An ensemble, so the client sends text |
| You need the OpenAI API today and a NIM exists | Stay on the NIM |
The comparison itself is the TensorRT-LLM lab. It records time to first token, time per output token, and tokens per second, at two concurrencies, and it does not borrow those numbers from another machine. A NIM that already meets the limit is the end of the decision, not a stepping stone you feel obliged to leave.
The GPU is the same pool NeMo uses. A Triton pod with nvidia.com/gpu: 1 will not schedule beside a fine-tune that already holds the device. Look at who holds it before you treat a Pending pod as a bad manifest.
Ports and probes
| Process | Client port | Also |
|---|---|---|
NIM, vLLM, trtllm-serve |
8000, OpenAI-compatible HTTP | A readiness probe on the same API |
| Triton HTTP | 8000, the v2 infer API |
gRPC on 8001 |
| Triton metrics | 8002, /metrics |
Scrape this, not the infer port |
Readiness for Triton is /v2/health/ready, and it stays false until the models in the repository have loaded. A Deployment that is Running with a failing readiness probe is not serving. The Triton lab uses that probe so a Route does not send traffic at an empty server.
Keep one client API per application. If the application speaks the OpenAI chat API, put vLLM, a NIM or trtllm-serve behind it. If the application speaks Triton's infer API, put the ensemble behind it. An application that knows both will break the day you swap the engine, which is the swap this series is trying to make cheap.
Weights stay on a volume. An engine rebuild reads them again, and a pod restart should not be the thing that downloads Llama a second time. The licence for those weights is accepted once, by a person, before the volume is filled.
A pod that pulls weights on every start will look unhealthy for as long as the download takes, and the readiness probe is what keeps traffic off it.
What's next
- Triton on OpenShift serves a small ONNX model and shows the repository layout.
- TensorRT-LLM builds an engine and compares it with vLLM.
- Model ensembles chains pre-processing, the model and post-processing.