Skip to main content

triton-hf-builder

CI License: Apache 2.0 Python 3.10+ Status: Beta

Turn a downloaded Hugging Face checkpoint into a Triton model repository.

The builder generates Triton configuration, runtime scripts and dependency files for Transformers, vLLM and TensorRT-LLM. Use it through the Python API, the triton-hf CLI, or the code-server extension in Triton Control.

Python API · Serving guide · Serving tests · Contributing

Install

Requires Python 3.10+.

python -m pip install triton-hf-builder

For development from a source checkout, see Contributing.

Quick start

Point source to a complete local checkpoint with weights and tokenizer files. Choose a new output directory outside the checkpoint directory.

Generation copies the checkpoint assets without loading weights and runs without a GPU. Allow disk space for a complete checkpoint copy.

from triton_hf_builder import generate_repository

result = generate_repository(
    source="/workspace/hf-checkpoint",
    output="/workspace/model_repository",
    name="my_model",
    runtime="python",
    triton_version="26.06",
    device="cpu",
)
print(result.model_directory / "config.pbtxt")
print(result.manifest["image"])  # nvcr.io/nvidia/tritonserver:26.06-py3

Choose the Triton release and serving runtime. The builder selects the image and writes requirements.txt using its bundled dependency profiles. python is an alias for the Transformers adapter. The code-server environment can use a different backend; it does not need the serving engine installed.

Runtime Image selected for triton_version="26.06"
python / transformers nvcr.io/nvidia/tritonserver:26.06-py3
vllm nvcr.io/nvidia/tritonserver:26.06-vllm-python-py3
tensorrt-llm nvcr.io/nvidia/tritonserver:26.06-trtllm-python-py3

Generation stays offline. Unknown image/device combinations use dependency defaults with an explicit warning. For custom images, pass image="my/serving:tag" instead of triton_version. See the Python API for overrides and all options.

The equivalent CLI:

triton-hf inspect /workspace/hf-checkpoint
triton-hf build /workspace/hf-checkpoint \
  --output /workspace/model_repository --name my_model \
  --runtime python --device cpu --triton-version 26.06

Generated output

For the Transformers example above, a checkpoint with a single Safetensors weight file produces the following layout. Checkpoint filenames vary with the source.

model_repository/
├── my_model/
│   ├── config.pbtxt                 # Triton model configuration
│   └── 1/
│       ├── model.py                 # Triton Python adapter
│       ├── settings.json            # Task and generation settings
│       └── model/
│           ├── config.json
│           ├── model.safetensors    # Copied checkpoint weights
│           ├── tokenizer.json
│           ├── README.md            # Original model card, if supplied
│           └── LICENSE              # Original model license, if supplied
├── requirements.txt                # Serving dependencies
├── serving.json                    # Runtime, image and build metadata
├── LICENSE.triton-hf-builder        # License for generated support scripts
└── README.md                       # Serving instructions

TensorRT-LLM uses the same layout with its own Python adapter. For vLLM, my_model/1/model.json replaces model.py and settings.json, and prepare_repository.py is added at the repository root.

Deploy the model_repository/ root to Triton after preparing its serving dependencies; generation alone does not validate inference. See the serving guide for deployment and vLLM path preparation.

Adapters and compatibility

Builder adapter (runtime) Triton backend Model execution Tasks Device
transformers Python Hugging Face Transformers with PyTorch Generation, text-to-text, classification, raw features CPU or GPU
vllm vLLM vLLM engine Text generation GPU
tensorrt-llm Python TensorRT-LLM LLM API with PyTorch backend Text generation GPU

The API parameter runtime selects the builder adapter. The Triton backend and model execution framework are separate layers.

Recognized multimodal checkpoints and custom model Python are outside the current adapter scope. See runtime limitations.

Manufacturer compatibility catalog

Architecture support reported by the backend projects; individual models may require additional configuration.

Triton image Backend Supported architectures
26.09-vllm-python-py3 vLLM 118 candidates †
26.06-vllm-python-py3 vLLM 129 candidates †
26.07-trtllm-python-py3 TensorRT-LLM 18 candidates
26.06-trtllm-python-py3 TensorRT-LLM 18 candidates

Source: NVIDIA image matrix. † Upstream base version; NVIDIA build differs.

Full catalog: architecture names, exact engine versions, CUDA and reported driver versions. See the linked backend documentation for quantization, GPU and feature requirements.

The catalog tracks 26.06 and the latest documented image per runtime. A weekly workflow proposes updates as PRs. Maintenance and selection policy.

Try it on Colab CPU

Open the generation-only notebook to download a pinned SmolLM2 checkpoint, inspect it and generate a CPU repository using the Python API. No GPU or Docker is needed. This example does not load the model or run inference. See the Colab example.

Try it with Docker

Run a complete CPU serving example from a repository checkout:

./examples/docker/quickstart.sh

The launcher downloads a small pinned checkpoint, generates its model repository, builds the serving image, waits for readiness and sends an inference request. No GPU or local Python installation is needed. The first run downloads large images and dependencies; later runs reuse cached files and build layers. See the Docker quickstart for requirements, requests and cleanup.

Development and releases

See CONTRIBUTING.md for local checks and RELEASING.md for package publication and code-server integration. Real GPU serving tests are opt-in; follow the test guide.

Apache-2.0 license · Licensing and test models · Security policy · Code of Conduct Model weights and serving engines retain their own licenses.

Metadata

Release files for triton-hf-builder 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for triton-hf-builder 0.1.4
File Size Uploaded Provenance Actions
triton_hf_builder-0.1.4.tar.gz 89.7 kB With provenance Details for triton_hf_builder-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for triton-hf-builder 0.1.4
File Interpreter ABI Platform Actions
triton_hf_builder-0.1.4-py3-none-any.whl Python 3 none any Details for triton_hf_builder-0.1.4-py3-none-any.whl

Total release size: 118.3 kB

Release files / triton_hf_builder-0.1.4.tar.gz

Download URL triton_hf_builder-0.1.4.tar.gz
Size 89.7 kB
Tags Source
SHA-256 checksum
How to use checksums
83ef065690e9f5abf51ae2c17d077efa312f23fdd49d11be1806cd633109b8e6
BLAKE2b-256 checksum
How to use checksums
c06edc5af9ed70af6761c9322cdd856eb17d3e46ebc78702397e68303e60af14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Release files / triton_hf_builder-0.1.4-py3-none-any.whl

Download URL triton_hf_builder-0.1.4-py3-none-any.whl
Size 28.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5a63212df73810b04128538778eca649b878e8fac8283746b63281c1eb0aad2b
BLAKE2b-256 checksum
How to use checksums
fef896f377be8181d900fe1cb87bdd8dbcf7e8d08c189f2a1e6a9740a5322f42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Security for triton-hf-builder 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for triton_hf_builder-0.1.4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page