Skip to main content
To get the best performance, we recommend using our TensorRT-LLM Engine-Builder when deploying LLMs. Models deployed with the Engine-Builder are OpenAI compatible, support structured output and function calling, and offer deploy-time post-training quantization to FP8 with Hopper GPUs and NVFP4 with Blackwell GPUs. The Engine-Builder supports LLMs from the following families, both foundation models and fine-tunes:
  • Llama 3.0 and later (including DeepSeek-R1 distills)
  • Qwen 2.5 and later (including Math, Coder, and DeepSeek-R1 distills)
  • Mistral (all LLMs)
You can find preset Engine-Builder configs for common models in the Engine-Builder reference.
The Engine-Builder does not support vision-language models like Llama 3.2 11B or Pixtral. For these models, we recommend vLLM.

Example: Deploy Qwen 2.5 3B on an H100

This configuration builds an inference engine to serve Qwen 2.5 3B on an H100 GPU. Running this model is fast and cheap, making it a good example for documentation, but the process of deploying it is very similar to larger models like GLM-4.7.

Setup

This guide uses uvx to run Truss commands without a separate install step. Sign in to Baseten and install the OpenAI SDK. Browser login opens a tab to approve this device, so there’s no API key to copy and paste.
Sign in to Baseten
Install the OpenAI SDK
Hugging Face access for gated models. Some models require that you accept terms and conditions on Hugging Face before deployment. To prevent issues:
  1. Accept the license for any gated models you wish to access, like Gemma 3.
  2. Create a read-only user access token from your Hugging Face account.
  3. Add the hf_access_token secret to your Baseten workspace.

Configuration

Start with an empty configuration file.
This configuration file specifies model information and Engine-Builder arguments. You can find details on each config option in the Engine-Builder reference. Below is an example for Qwen 2.5 3B.
config.yaml

Deployment

Pushing the model to Baseten kicks off a multi-stage build and deployment process.
Upon deployment, check your terminal logs or Baseten account to find the URL for the model server.

Inference

This model is OpenAI compatible and can be called using the OpenAI client.
Check the Engine-Builder reference for details on each config option.