Product case study · September 1, 2026

TensorRT Model Connect: Build a Qwen Bundle, Then Keep Inference Native

Build a supported Qwen bundle with TensorRT Model Connect, run its smoke check, and keep the deployment boundary explicit when GPU evidence is unavailable.

Reading time
14 min
Checked
Nov 23, 2026
Paper checkpoint cards pass through a charcoal build frame into a sealed bundle and a separate blue runtime block, with evidence cards beneath
A bundle is the boundary between the Python-first build environment and the native application runtime; automation does not collapse those layers
Bottom line

TensorRT Model Connect offers a clear source-build path from Qwen/Qwen3-0.6B to a TensorRT bundle and native C++ task API, but it is an public-preview reference project rather than a stable deployment promise. The September checkout had no NVIDIA driver/GPU access and no Docker-daemon access, so its build and C++ smoke result is unmeasured; the included harness is a reproducible contract, not performance evidence.

Documentation checked November 23, 2026; no new GPU run. TensorRT Model Connect still separates checkpoint building from native inference, but its public interfaces have changed. NVIDIA now labels it public preview. The September recipe below is retained for its pinned source revision; do not paste its old flags or C++ includes into a current checkout.[2]

What changed: migrate the recipe before running it

The current README builds Qwen with python -m tensorrt_model_connect build, uses --max-sequence-length, and runs with --use-chat-template true and --enable-thinking false. Its C++ example uses trtmc::load_task, then checks for trtmc::ITextGeneration; the old trtmc::load pipeline snippet below is historical.[2]

The generic quick start now demonstrates GPT-2, while the README still shows Qwen. These are different examples. For this article’s Qwen workflow, keep the exact checkpoint and consult the Qwen family recipe before selecting precision or generation settings.[2][3][5]

BoundarySeptember recipe retained belowNovember documentation
Build entry pointtrtmc buildPython build module in the README
Sequence capacity--max-cache-length--max-sequence-length in the README
Runtime discoveryTRTMC_MODEL_PLUGIN_DIRMatching libraries together; explicit --runtime-root for another directory
C++ interfacePipeline APITask loader and checked text-generation interface

The current quick start says the loader looks beside the active runtime library by default. An explicit runtime root must contain the matching core, runtime, backend and model-family shared libraries. It does not search environment variables or fall back to the current directory. Exporting the old plugin variable therefore does not repair a current missing-library error.[3]

Prepare a current run without mixing versions

  1. Use a fresh disposable checkout and record its full commit before installation. Keep the historical checkout separate.
  2. Read that revision’s source-build instructions and Qwen manifest. The current source guide provides development-container automation and a manual build path; review the operations before allowing an agent to execute them.[4]
  3. Record the exact model snapshot, software stack and runtime-library directory. Current system requirements list TensorRT 11.4.0.106 for release wheels, still restricted to Linux aarch64. Linux x86_64 remains a source-build route. This does not update the old revision’s requirements retroactively.[4]
  4. In the prepared environment, inspect the installed interfaces before downloading weights:
python -m tensorrt_model_connect build --help
trtmc version
trtmc run --help

These are proposed checks, not commands executed for this refresh. Compare their output with the documentation from the recorded revision. If options differ, stop and resolve the mismatch instead of borrowing flags from another release.

For a current native application, follow the README’s C++ example and the matching build integration. Do not reuse this site’s September native-smoke.cpp unchanged. The bundled run-smoke.sh, screenshots and acceptance fixture also remain historical; this refresh does not requalify them.

Diagnose the first failure

SymptomNext check
Python module missingConfirm the active wheel or editable environment; inspect build help there.
Model download deniedCheck exact ID, revision and access; keep the same checkpoint.
Family library missingInventory the runtime root and compare all library versions.
Different generated textCompare revision, input framing, precision and sampling with the family’s test case.

These recovery boundaries follow NVIDIA’s current troubleshooting guide.[9] Keep the first error and full commands. A fixed seed helps repeat a test, but does not guarantee identical output across GPU or software changes. A passing CLI response still needs the separate native C++ check and runtime inventory described below.

Historical recipe: September 1 source revision

Everything from this heading through the original acceptance checklist describes the September source pin. The November migration notes above supersede claims about what is current. The old hardware-access receipt remains useful evidence of what was not measured; it is not a fresh inventory of this worker.

What was and was not verified here

The source commit checked for this guide is f23a07e54521725d33d31c8d1f51d3a030d46a66 (recorded as main HEAD on 2026-09-01). Its LICENSE is Apache-2.0.[2][6] The selected public checkpoint is Qwen/Qwen3-0.6B, which appears in NVIDIA’s official support matrix with an FP16 profile; NVIDIA’s quick start specifies a BF16 first build profile for this path.[3][5]

The local preflight did not reach installation: nvidia-smi was not installed, trtmc was absent, and Docker’s daemon socket returned permission denied. That is a hardware/access block, not a failed TensorRT Model Connect result. No model was downloaded, no container was built, and no bundle or C++ inference output exists. The complete command receipt is in benchmarks/tensorrt-model-connect/command-log.md; the machine-readable record is environment.json.

Terminal-style screenshot of the actual unmeasured preflight: x86_64 host, missing nvidia-smi, Docker installed but daemon access denied

Do not replace that missing evidence with a same-family checkpoint, a cloud GPU purchase, or a guessed source revision. Before a measured run, resolve the checkpoint’s immutable Hugging Face commit and record its license and file hashes. NVIDIA’s current matrix does not publish an immutable revision for this Qwen row, so this guide does not pretend the floating model name is a pin.[5]

Keep the layers separate

Diagram separating model, infrastructure, native application, and harness layers

  • Model: Qwen/Qwen3-0.6B is the Hugging Face checkpoint. It has its own license, revision, files, behavior, and supply-chain risk.[7]
  • Inference infrastructure: TensorRT Model Connect maps a supported checkpoint to TensorRT engines and packages model-specific assets in a .bundle. TensorRT remains the execution substrate.[1]
  • Harnesses and skills: a shell harness or agent skill can fetch, build, inspect, and log work. It is orchestration, not a model implementation, TensorRT runtime, or a security boundary. Review it before it runs with credentials or broad filesystem access.
  • Application: your C++ process loads the bundle and calls the task API. NVIDIA says the deployed application can run without a Python interpreter or PyTorch in its production runtime; that must be verified in the exact runtime container you ship.[1]

NVIDIA’s own repository includes an Agent Skills plugin and tells agents to read the repository instructions, inspect the exact model descriptors/manifests, and separate static evidence from GPU execution evidence.[8] That is sensible process guidance, not a reason to execute an unreviewed plugin in a privileged profile.

Prerequisites: use the source path on x86_64

The September release-wheel route was for Linux aarch64 with Python 3.10 or 3.12, glibc 2.39 or newer, and official TensorRT 11.1.0.106. Linux x86_64 users should use the source-build route instead.[4] For the source route, NVIDIA requires Linux x86_64 or aarch64, Docker, NVIDIA Container Toolkit, enough disk for the image and bundle, and a compatible GPU visible to nvidia-smi.[4]

On an approved GPU host, start with:

uname -m
nvidia-smi
docker --version

Record the GPU model, driver, reported CUDA version, compute capability, TensorRT version inside the container, container image digest, and free disk space. Do not mix TensorRT libraries, DSOs, or bundles from different cohorts.[4]

The pinned source checkout must precede any build:

git clone https://github.com/NVIDIA/TensorRT-Model-Connect.git
cd TensorRT-Model-Connect
git checkout f23a07e54521725d33d31c8d1f51d3a030d46a66

Then resolve Qwen/Qwen3-0.6B to a specific Hugging Face revision, inspect the model card and files, and write that revision plus file hashes into the environment manifest. Stop if the license or access conditions are not acceptable.

Build the documented Qwen bundle

NVIDIA’s source-build guide selects a GPU once, derives its SM, builds the matching development image, and mounts the source checkout into it.[4] From the pinned checkout:

GPU=0
SM="$(nvidia-smi -i "$GPU" --query-gpu=compute_cap --format=csv,noheader,nounits | tr -d '.[:space:]')"
IMAGE=trtmc-quickstart
case "$(uname -m)" in
  x86_64) DOCKERFILE=Dockerfile.dev.x86 ;;
  aarch64) DOCKERFILE=Dockerfile.dev.aarch64 ;;
  *) echo "Unsupported host architecture: $(uname -m)" >&2; exit 1 ;;
esac
docker build -f "$DOCKERFILE" -t "$IMAGE" requirements
SOURCE_DIR="$(git rev-parse --show-toplevel)"
docker run --rm -it --gpus "device=${GPU}" --ipc=host \
  --mount "type=bind,source=${SOURCE_DIR},target=/src" --workdir /src \
  --env TRTMC_SM="$SM" "$IMAGE" bash

Inside that disposable container, build only the CLI, TensorRT backend, and Qwen model DSO that the quick start needs:

python -m pip install --no-deps -e . -C py-only=true
TRTMC_BUILD_DIR="build-sm${TRTMC_SM}"
cmake -S . -B "$TRTMC_BUILD_DIR" -G Ninja \
  -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_CUDA_ARCHITECTURES="${TRTMC_SM}-real" \
  -DTRTMC_BUILD_BACKEND_TRT=ON -DTRTMC_BUILD_BACKEND_RTX=OFF \
  -DTRTMC_BUILD_TESTS=OFF -DTRTMC_BUILD_BENCHMARKS=OFF \
  -DTRTMC_ENABLE_LIBTORCH_MULTINOMIAL=OFF
cmake --build "$TRTMC_BUILD_DIR" --parallel "$(nproc)" --target trtmc trtmc_backend_trt trtmc_model_qwen
export TRTMC_MODEL_PLUGIN_DIR="$TRTMC_BUILD_DIR/models"
export PATH="$PWD/$TRTMC_BUILD_DIR:$PATH"
trtmc version

Now build the bundle using NVIDIA’s bounded cache profile:

trtmc build Qwen/Qwen3-0.6B \
  --precision bf16 \
  --max-cache-length 16384 \
  --output qwen3-0.6b.bundle
trtmc inspect ./qwen3-0.6b.bundle
trtmc inspect ./qwen3-0.6b.bundle --list-engines

Keep the first failing command and full error rather than changing several flags. The documented inspection signals for this route are the Qwen family, qwen_decoder_kv_cache, BF16, the configured cache length, and two engine plans.[3]

Run twice, then prove the native boundary

The fixed CLI smoke prompt uses NVIDIA’s quick-start decoding values. The harness fixes the prompt and seed to aid repeatability; this is not a determinism guarantee or a benchmark:

trtmc run ./qwen3-0.6b.bundle \
  --prompt "What is the capital of France? Answer in one word." \
  --chat-template --no-thinking --max-new-tokens 64 \
  --temperature 0.7 --top-k 20 --top-p 0.8 --seed 42

The expected signal is Paris and a clean exit, but record the complete non-empty output twice rather than filtering to one word.[3] benchmarks/tensorrt-model-connect/run-smoke.sh runs the build, both inspections, and two smoke calls with guards for trtmc, nvidia-smi, and TRTMC_MODEL_PLUGIN_DIR.

The second command in the “two-command” story is the application load/run, not another Python build step. The minimal task-level shape NVIDIA documents is:

#include <trtmc/pipeline.h>
auto pipeline = trtmc::load("qwen3-0.6b.bundle");
auto result = pipeline->generate(
    "What is the capital of France? Answer in one word.",
    {.max_new_tokens = 64});
std::cout << result.text << std::endl;

benchmarks/tensorrt-model-connect/native-smoke.cpp turns that into a complete program that rejects empty output. Resolve the compile/link command from the pinned checkout’s CMake/package integration rather than guessing flags in a tutorial. Preserve that command, its compiler output, and a runtime-container inventory that demonstrates neither Python nor PyTorch is required for the deployed process.

Checklist-style screenshot of the five evidence requirements; each remains unmeasured on this checkout

A measured pass requires all five conditions: a bundle built from the recorded source/checkpoint pair, successful bundle inspection, a successful native C++ load/generate, two non-empty fixed-prompt outputs, and cleanup evidence. The expected contract is stored in output-fixture.json; it is not captured output.

Historical troubleshooting and cleanup

Treat the first boundary as the problem. NVIDIA’s first-run guide maps missing nvidia-smi to driver/GPU access, an absent CLI to the active source build, CMake errors to the development container, missing model DSOs to the plugin directory, and ABI errors to mixed TensorRT/DSO cohorts.[9]

For a support request, retain the source commit, install path, model ID and resolved revision, build command, run command, bundle checksum, GPU/driver/CUDA/TensorRT receipt, first failing command, and complete error.[9] Do not post access tokens, gated-model URLs, private cache paths, or full agent transcripts.

Cleanup is part of the check. Remove only the recorded bundle path, stop/remove the disposable development container if it was not started with --rm, and delete the disposable checkout and cache paths you created. Do not delete a shared Hugging Face cache, a shared Docker image, or a model you did not build. Re-run docker ps -a, inspect the recorded bundle path, and record the cleanup result.

This is a narrow, source-grounded deployment recipe. A successful run says this source, checkpoint, stack, and prompt worked on one recorded host. It does not prove a performance advantage, stable API, production reliability, or compatibility for another GPU or fine-tune.

Sources

The live README, quick start, system requirements, source-build guide, model inventory and troubleshooting pages were checked on 2026-11-23 for the migration notes. Other references below retain their original historical scope; no new inference or performance result is claimed.

[1] https://developer.nvidia.com/blog/deploy-an-open-model-from-checkpoint-to-inference-in-two-commands-with-nvidia-tensorrt-model-connect/ — NVIDIA Technical Blog, “Deploy an Open Model from Checkpoint to Inference in Two Commands with NVIDIA TensorRT Model Connect,” August 28, 2026.

[2] https://github.com/NVIDIA/TensorRT-Model-Connect — project README, project status, source revision, and repository guidance, checked 2026-09-01 and rechecked 2026-11-23 (now public preview).

[3] https://nvidia.github.io/TensorRT-Model-Connect/getting-started/quick-start — current generic GPT-2 quick start and runtime lookup, checked 2026-11-23; September Qwen instructions are historical.

[4] https://nvidia.github.io/TensorRT-Model-Connect/getting-started/environment-and-repro and https://nvidia.github.io/TensorRT-Model-Connect/getting-started/source-build — host requirements, source-container commands, and source-build targets, checked 2026-11-23.

[5] https://nvidia.github.io/TensorRT-Model-Connect/models-recipes/overview — current family-owned recipes and exact-checkpoint scope, checked 2026-11-23.

[6] https://github.com/NVIDIA/TensorRT-Model-Connect/blob/main/LICENSE — Apache License 2.0 text.

[7] https://huggingface.co/Qwen/Qwen3-0.6B — Qwen model card, model identity, and model-level deployment information, checked 2026-09-01.

[8] https://nvidia.github.io/TensorRT-Model-Connect/agent-guide — agent workflow and evidence boundaries.

[9] https://nvidia.github.io/TensorRT-Model-Connect/getting-started/troubleshooting — first-run failure boundaries and support receipt, checked 2026-11-23.

Put this to work

Separate a source checkpoint, TensorRT deployment infrastructure, automation harnesses, and the native application that loads a bundle.

Try

Use a disposable supported-GPU host, pin the source and Hugging Face revisions, and follow the documented source-container path without local patches.

Prove it worked

Keep the host receipt, source commit, resolved checkpoint revision, build and native C++ commands, two fixed outputs, bundle checksum, and cleanup record.

Where it can pay

A passing smoke test establishes a narrow compatibility receipt, not a throughput claim, a production certification, or coverage for same-family fine-tunes.

Keep in view

  • The current README uses a Python build module and a native task loader; the retained September commands belong to an older source revision.
  • On Linux x86_64, the published path is a source build in NVIDIA's development container; release wheels are currently aarch64-only.
  • The September preflight was blocked by GPU and Docker access; this November documentation refresh adds no inference measurement.
  • The repository is Apache-2.0 licensed and in public preview; match the exact checkpoint, source revision, GPU, CUDA and TensorRT cohort before treating it as support.
Learn the workflow: build a scoped project with evidence