# TensorRT

> Canonical: https://skillalmanac.com/glossary/tensorrt | Last verified: 2026-11-24 | Index status: not offered to search engines

TensorRT is NVIDIA's software development kit for optimising deep learning inference on NVIDIA GPUs. It takes a trained model and compiles it into an optimised engine for one deployment setup. TensorRT-LLM is a related open-source library for large language models.

Also called: NVIDIA TensorRT.

## In plain language

TensorRT is a tool from NVIDIA that prepares an already-trained AI model to run on NVIDIA graphics chips. Training teaches a model; running it afterwards is called inference. TensorRT takes the finished model and rebuilds it so it matches the chip and the settings you plan to use, a bit like tailoring a suit to one person. The result is tied to that setup, so a build for one GPU or configuration is not a drop-in file for another. It works with NVIDIA hardware, so it is not an option on other makers' chips, and the engineering time to set it up is a cost in itself. A related library, TensorRT-LLM, is aimed at large language models.

## Technical definition

NVIDIA's documentation describes TensorRT as an SDK for optimising deep learning inference on NVIDIA GPUs. It takes trained models from frameworks such as PyTorch and from the ONNX format and compiles them into optimised engines tailored to a specific deployment configuration, with support for dynamic input shapes, per the docs index. NVIDIA's developer page presents TensorRT as an ecosystem that includes the TensorRT SDK, TensorRT LLM, NVIDIA Model Optimizer and TensorRT for RTX. It describes TensorRT-LLM as an open-source library for large language model inference on NVIDIA's platform with a Python API. Its documentation lists quantization and speculative decoding among its features, and trtllm-serve among its tools.

## How it shows up when you use agents

TensorRT sits below your coding agent, on the machine that serves a model. If you use Claude Code or Codex against a hosted model, you do not touch it. You meet it when you run a model yourself on NVIDIA hardware and want to optimise [inference](/glossary/inference): the build step turns a trained model, often exported as [ONNX](/glossary/onnx), into an engine for your chosen GPU and settings.

Hugging Face's Optimum page lists an integration for NVIDIA TensorRT-LLM, and NVIDIA's own documentation lists quantization and speculative decoding among TensorRT-LLM features. These are separate choices that you make and test, not automatic gains. See [quantization](/glossary/quantization).

What breaks when it is misunderstood: people expect a portable file. NVIDIA's documentation says engines are tailored to a specific deployment configuration, so changing the deployment configuration can mean rebuilding, in the docs' words. A second error is assuming it applies everywhere. It targets NVIDIA hardware, as the developer page lists, so it does not help on other chips.

Next actions: confirm the model fits your GPU first (see [GPU for AI](/glossary/gpu-for-ai)), measure your own workload before and after, and keep the original model so you can compare outputs. The catalogue has no TensorRT skill, so the examples are adjacent checks on sizing and cost.

## Common confusions

- **TensorRT versus TensorRT-LLM.** NVIDIA's page presents TensorRT-LLM as one member of the TensorRT ecosystem, an open-source library for large language models. The SDK is the general tool for deep learning models.
- **TensorRT versus CUDA.** [CUDA](/glossary/nvidia-cuda) is NVIDIA's platform for programming its GPUs. TensorRT is an SDK for optimising inference on those GPUs.
- **Training versus inference.** TensorRT is for running a trained model. It does not train one.
- **TensorRT versus TensorRT for RTX.** NVIDIA lists TensorRT for RTX as a separate member aimed at GeForce RTX and RTX Pro GPUs in laptops and desktops.

## Worked examples in this catalogue

### [local-model-sizing](https://skillalmanac.com/skills/skill-almanac/local-model-sizing)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A check on whether an open-weight language model will run on a given GPU, Mac or PC, with a script that computes weight, KV-cache and overhead memory per quantisation.

Why it exercises the concept: Adjacent. Before you invest in an inference engine, you need to know the model fits your hardware at all. This skill answers that. It does not build TensorRT engines.

### [Self-Hosting an AI Agent: What You Take On](https://skillalmanac.com/learn/self-hosted-ai-agent-considerations)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: What you own when an AI agent runs on your machine: model memory, network exposure, file access and vetting skills, as a checklist with decision points.

Why it exercises the concept: Adjacent. Running your own inference stack makes you responsible for the hardware side. This guide lists what self-hosting adds. It is about agents, not about TensorRT.

### [llm-cost-estimator](https://skillalmanac.com/skills/skill-almanac/llm-cost-estimator)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A usage profile and your own price table turned into a monthly LLM cost range with cache, batch and subscription effects.

Why it exercises the concept: Adjacent. Self-run inference is one way to change what a model costs to serve. This estimator works from your own price table and does not model TensorRT.

## Related terms

- [Inference](https://skillalmanac.com/glossary/inference.md)
- [GPU for AI](https://skillalmanac.com/glossary/gpu-for-ai.md)
- [CUDA](https://skillalmanac.com/glossary/nvidia-cuda.md)
- [Quantization](https://skillalmanac.com/glossary/quantization.md)
- [ONNX (Open Neural Network Exchange)](https://skillalmanac.com/glossary/onnx.md)
- [Large language model (LLM)](https://skillalmanac.com/glossary/large-language-model.md)

## Sources

- [TensorRT SDK](https://developer.nvidia.com/tensorrt), NVIDIA Developer (accessed 2026-11-24)
- [NVIDIA TensorRT Documentation](https://docs.nvidia.com/deeplearning/tensorrt/latest/index.html), NVIDIA (accessed 2026-11-24)
- [Welcome to TensorRT LLM's Documentation](https://nvidia.github.io/TensorRT-LLM/), NVIDIA (TensorRT-LLM documentation) (accessed 2026-11-24)
- [Optimum](https://huggingface.co/docs/optimum/index), Hugging Face (accessed 2026-11-24)

Definitions are written by Skill Almanac from the sources above and checked against them on 2026-11-24. [Glossary index](https://skillalmanac.com/glossary.md).
