Deploy an Open Model from Checkpoint to Inference in Two Commands with NVIDIA TensorRT Model Connect
Mirrored from NVIDIA Developer Blog for archival readability. Support the source by reading on the original site.
Deploy an Open Model from Checkpoint to Inference in Two Commands with NVIDIA TensorRT Model Connect
AI-Generated Summary
- NVIDIA TensorRT Model Connect provides an open collection of reference implementations for deploying supported open models with TensorRT in native C++ applications.
- A two-phase workflow builds a deployment bundle from a Hugging Face model ID using a Python CLI, then loads and runs the bundle in C++ without requiring PyTorch or a Python interpreter at runtime.
- Two C++ API levels are available: a semantic API for task-level inputs and outputs, and a module-level API for direct tensor and component control.
- Custom GPU kernels can be integrated through TVM FFI while TensorRT executes the rest of the pipeline.
- The project uses AI-native development with coding agents and nightly releases to keep pace with the rapidly evolving open model ecosystem.
Next Steps
- Visit the NVIDIA/TensorRT-Model-Connect GitHub repository to find supported implementations and build a model bundle.
- Read the TensorRT Model Connect documentation for model coverage, architecture details, and a full developer guide.
Open AI models are evolving faster than ever, but bringing them into native applications can still require model-specific conversion, preprocessing, post-processing, and runtime code.
NVIDIA TensorRT Model Connect open collection of reference implementations helps to address this challenge. TensorRT Model Connect shows you how to run supported models with NVIDIA TensorRT in native C++ applications. You can use, inspect, modify, and extend the implementations. Model Connect is designed to support the open model ecosystem wherever TensorRT runs.
This post explains what NVIDIA TensorRT Model Connect is and how to deploy a model from Hugging Face model ID to native C++ inference in two commands. It also covers the two API levels TensorRT Model Connect provides, how to integrate custom GPU kernels, and how the project is built to keep pace with the open model ecosystem.
How to deploy a model from model ID to native C++ inference in two commands
Getting a model into production should not require deep compiler expertise. Model Connect splits deployment into two phases with a single artifact between them.
1. Build the bundle (Python CLI)
For a supported model, the first phase is building a deployment bundle from a Hugging Face model ID or local checkpoint:
trtmc build Qwen/Qwen3-0.6B -o qwen3-0.6B.bundle
The bundle contains the TensorRT engines and the model-specific assets needed at runtime.
2. Load and run (C++)
In the second phase, a native C++ application then loads the bundle and works with task-level inputs and outputs:
#include <trtmc/pipeline.h>
auto pipeline = trtmc::load("qwen3-0.6b.bundle");
auto result = pipeline->generate("Explain why native inference matters.", {.max_new_tokens = 20});
std::cout << result.text << std::endl;
Model Connect handles checkpoint mapping, TensorRT engine construction, preprocessing, runtime orchestration, and post-processing. You start with a complete working implementation instead of rebuilding this integration for every model family.
You can use Python to prepare the model, but the deployed application runs natively without requiring PyTorch or a Python interpreter in its production runtime.
Two API levels, one starting point
Model Connect provides two levels of C++ APIs. With the semantic API, you can work with familiar inputs and outputs, such as prompts, images, and audio, while Model Connect handles model-specific preprocessing, execution, and post-processing.
If you need more control, the module-level API allows you to work directly with named tensors and individual TensorRT components to customize the inference pipeline. Both APIs use the same Model Connect implementations, so you can start with a simple task-level interface and customize the pipeline only when needed.
Extend TensorRT Model Connect with custom kernels
TVM FFI provides a language-agnostic interface for invoking GPU kernels without tightly coupling the calling system to the kernel’s implementation framework or runtime. Using TVM FFI through TensorRT Model Connect, you can replace a targeted portion of a model with a custom GPU kernel while TensorRT continues to execute the rest of the inference pipeline. This makes it easier to integrate specialized or newly developed kernels without rebuilding the application around a separate runtime. See the Bring Your Own Kernel tutorial for a worked example.
Reference implementations for the open model ecosystem
Model Connect is not a new inference framework or a replacement for TensorRT. It is a bridge between the end-to-end inference experience for open models and the ability of TensorRT to translate a computation graph into an accelerated engine on GPU.
Each model’s implementation serves three purposes:
- Running a supported open model in a native TensorRT-enabled application
- Learning from a complete, inspectable implementation of the model and its inference pipeline
- Extending the implementation for a related architecture, custom checkpoint, or application requirement
This provides the broader ecosystem with a clearer path to TensorRT deployment from a model ID. Application developers can begin with working code. Community contributors can reuse existing patterns to add support for new models instead of starting from zero.
The goal is straightforward: wherever TensorRT is available, you should have a consistent Model Connect path for supported open models.
Built AI-natively to keep pace with open models
The open model ecosystem changes quickly. New architectures and checkpoints appear continuously, so a reference library must evolve just as quickly.
Model Connect is built as an AI-native software project. Coding agents generate implementation code, tests, integrations, and documentation under human direction and review. This enables the project to develop and validate multiple model implementations in parallel while maintaining a consistent architecture and user experience.
Model Connect uses nightly releases to shorten the path from a new model, user report, or contribution to an available implementation. Automated validation remains the release gate. The faster cadence helps new model support, fixes, and UX improvements reach you sooner.
Delivering the complete TensorRT workflow
Model Connect is built on TensorRT, so performance remains central. For supported and validated workloads, Model Connect can deliver faster inference than torch.compile, and each implementation is continuously tested and optimized as the project evolves.
Performance should not come at the expense of usability. Model Connect brings the complete workflow together: find the model ID, build the model, load it from C++, and adapt it when needed. You get an accessible path to high-performance TensorRT inference while retaining the ability to inspect, customize, and optimize the underlying inference pipeline.
Get started with NVIDIA TensorRT Model Connect
Visit the NVIDIA/TensorRT-Model-Connect GitHub repo to find supported implementations and build a model bundle. Use an implementation as-is, adapt it for your application, or contribute support that helps the next developer bring another open model to TensorRT.
Want to use an AI-native quick start that doesn’t require a complicated setup? Open a terminal in any folder you can access, then paste the following prompt into a coding agent. You should have a complete deployment in minutes.
/goal Clone https://github.com/NVIDIA/TensorRT-Model-Connect.git into a new TensorRT-Model-Connect directory in the current workspace. Detect the current GPU compute capability, modify the repository development Docker image, build and start the container, install TensorRT-Model-Connect, compile the CLI, TensorRT backend, and all native model DSOs only for that SM, then build and run an end-to-end Qwen/Qwen3-0.6B smoke test. Do not commit or push changes. Report the result of the test, show exact command, input and output of the inference run.
For more about model coverage, architecture details, and a full developer guide, see the TensorRT Model Connect documentation.
Tags
About the Authors
Lin Chai is a senior product manager at NVIDIA, leading TensorRT and TensorRT Edge-LLM, NVIDIA’s AI inference platforms for deep learning across datacenter and embedded platforms. Drawing on her background in autonomous driving and automotive OEMs, she is inspired to build production-grade inference systems that deliver best-in-class performance for deep learning workloads across data center, edge, and physical AI applications—enabling systems that perceive, reason, and act in the real world.
Yifei Fang is a senior software engineer on the NVIDIA TensorRT team, where he leads the AI-Native Software initiative for NVIDIA TensorRT Model Connect. His work focuses on expanding model support across the TensorRT ecosystem and fostering a vibrant community around framework-independent inference software.
Vivian Chen is a deep learning solutions architect at NVIDIA, where she helps developers turn AI models into scalable, production-ready applications. She specializes in inference optimization and cloud-integrated AI systems, helping teams improve performance and scalability across the NVIDIA accelerated computing stack.
Yizhuo Zhang is a senior software engineer on the NVIDIA TensorRT team, where he develops high-performance, reliable AI inference software. His work spans Automotive Safety, TensorRT usability improvements, and enabling TensorRT on new NVIDIA hardware platforms.
Michael Ferry is a software engineering manager on the NVIDIA TensorRT team, where he leads the TensorRT Edge-LLM, Automotive Safety, and New Platforms teams. His work centers on optimized, reliable AI inference for safety-critical robotics and automotive edge systems. Before joining NVIDIA in 2018, Michael created and led several floating-point-focused verification tools at Intel. He holds a PhD in Mathematics, specializing in numerical optimization, from the University of California, San Diego.
Comments
More from NVIDIA Developer Blog
-
NVIDIA NVLink Fusion Brings NVHBM to Next-Generation AI Infrastructure
Aug 26
-
How to Train a Cross-Embodiment Robot Navigation Policy with AI Agents
Aug 26
-
Experiment with Qwen3.8-Flash-Next 176B Model on NVIDIA GB300 NVL72 for Agentic Coding
Aug 26
-
Experiment with Qwen3.8-Flash-Next on NVIDIA GB300 NVL72 for Agentic Coding
Aug 26
Discussion (0)
Sign in to join the discussion. Free account, 30 seconds — email code or GitHub.
Sign in →No comments yet. Sign in and be the first to say something.