How to Serve LLMs with TensorRT-LLM

By the end of this walkthrough you'll have an OpenAI-compatible inference server running a real model on your own GPU through NVIDIA's TensorRT-LLM, plus a working example of swapping in an FP8-quantized checkpoint for lower memory use and higher throughput. This isn't a "hello world" — trtllm-serve handles the engine compilation and batching internals for you, but getting the prerequisites, container flags, and endpoint calls right on the first try is where most people lose an afternoon.

Prerequisites

  • An NVIDIA GPU on the supported hardware list — TensorRT-LLM's FP8 path in particular needs Hopper, Ada, or Blackwell-generation silicon.
  • Docker with the NVIDIA Container Toolkit installed, so --gpus all is available to docker run.
  • An NGC account is not required to pull the public release image, but a stable internet connection is, since the container is several gigabytes.
  • Roughly 20GB of free disk space for the container image plus model weights, more if you're pulling a larger checkpoint than the example model used here.

Step 1: Pull the TensorRT-LLM Release Container

TensorRT-LLM ships as a pre-built container on NGC, which is the fastest path to a working server — it bundles the compiled library, CUDA runtime, and CLI so you skip the pip/CUDA-Toolkit dependency chain entirely.