AIWiki
Malaysia
Back to all articles
Tools & PlatformsinferenceNVIDIAoptimisation

TensorRT-LLM

3 min readUpdated November 2026
TensorRT-LLM
Type
Inference optimisation library
Developed by
NVIDIA
First released
2023
Licence
Apache 2.0 (fully open source since March 2024)
Key features
FP8/FP4 quantisation, paged KV cache, in-flight batching, speculative decoding
Related
TensorRT, vLLM, SGLang, NVIDIA NIM
TensorRT-LLM is an open-source library from NVIDIA that compiles and optimises large language models for high-throughput, low-latency inference on NVIDIA GPUs. It provides a Python API for defining a model, applying optimisations such as quantisation and kernel fusion, and producing a TensorRT-LLM engine that can be served standalone or behind an OpenAI-compatible endpoint.[1]

History

NVIDIA released TensorRT-LLM in 2023 as the LLM-specific layer on top of its long-established TensorRT compiler, and moved the project fully onto GitHub under an Apache 2.0 licence in March 2024.[2] Its arrival coincided with the industry's shift from training economics to inference economics: as enterprises deployed chatbots and agents, the cost per generated token became the dominant budget line, and hardware vendors began competing on serving software as much as on silicon. Successive releases added in-flight (iteration) batching, paged KV caching, quantisation formats including FP8, FP4, INT4 AWQ and INT8 SmoothQuant, and advanced speculative decoding schemes such as EAGLE-3 and multi-token prediction.[1][3] NVIDIA reports that TensorRT-LLM v1.0 delivered an eight-fold improvement in AI inference performance over earlier stacks for the same hardware.[3]

Key Concepts

Four optimisations account for most of the speed-up. Quantisation — storing weights and activations in narrower numeric formats (FP8/FP4/INT4) shrinks memory traffic, which is the main bottleneck in autoregressive decoding; NVIDIA pairs this with a separate Model Optimizer library that converts checkpoints for deployment into TensorRT-LLM, vLLM or SGLang.[4] Paged KV caching — treating the key-value cache as paged memory lets the server pack many concurrent sequences into GPU memory without reserving contiguous blocks. In-flight batching — the runtime continuously admits and retires requests inside a single batch instead of waiting for a whole batch to finish, keeping the GPU busy. Speculative decoding — a small draft model (or an extra prediction head) proposes several tokens that the large model verifies in one pass, cutting perceived latency on token-heavy output.[1]

TensorRT-LLM is tightly coupled to NVIDIA hardware: the kernels assume CUDA and Tensor Core support, and its quantisation formats track the numeric formats of successive NVIDIA GPU generations. That coupling is both its advantage (peak performance on NVIDIA silicon) and its limitation (no portability to AMD or other accelerators, where ROCm-based vLLM or SGLang are used instead).[5]

Applications

Typical deployments include customer-facing chatbots with strict tail-latency targets, code-completion services inside IDEs, document-extraction pipelines in banks and insurers, and batch summarisation jobs. NVIDIA also packages the library inside NIM microservices, so enterprises can serve optimised models as containers rather than assembling the stack themselves.[3] Compared with pure-Python serving frameworks, TensorRT-LLM trades flexibility (custom sampling loops and exotic architectures need engine rebuilds) for raw throughput on supported models.

>See Also

🇲🇾Malaysian Context

🇲🇾 Relevance to Malaysia: Malaysia's rapid data-centre build-out — in Johor and the Klang Valley — is economically driven by inference throughput per ringgit of GPU, which is exactly what TensorRT-LLM optimises. Local AI infrastructure operators, MSC Malaysia-registered system integrators and enterprises running private LLMs use it to serve open-weight models in-house, keeping client and customer data inside Malaysian facilities and therefore clear of the cross-border transfer questions that arise under the PDPA 2010. It is also part of the curriculum MDEC-aligned training programmes and universities point to when teaching applied AI engineering, since tuning inference cost is the skill Malaysian teams need most as organisations move from pilots to production under the National AI Office's guidance.[6]

References

  1. ↑NVIDIA. TensorRT-LLM — GitHub repository. https://github.com/NVIDIA/TensorRT-LLM
  2. ↑NVIDIA. TensorRT-LLM overview documentation. https://nvidia.github.io/TensorRT-LLM/overview.html
  3. ↑NVIDIA Developer. NVIDIA TensorRT LLM. https://developer.nvidia.com/tensorrt-llm
  4. ↑NVIDIA. Model Optimizer — GitHub repository. https://github.com/NVIDIA/Model-Optimizer
  5. ↑AMD. vLLM and ROCm large language model inference. https://docs.vllm.ai/
  6. ↑Malaysia Digital Economy Corporation. Official website. https://www.mdec.my/