triton-hf-builder
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.
Examples · 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 |
The builder generates files; deployment starts Triton in the selected image.
To use your own existing serving image, pass its name and tag via image
instead of triton_version. See the
Python API
for dependency overrides.
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.
Review serving.json before deployment. It records the selected image,
effective requirements, model metadata, architecture documentation checks,
warnings and validation status. Keep it with the generated repository so deployment
tools can read those settings. Successful generation means static checks passed;
it does not mean dependencies were installed or inference was tested.
For engine runtimes, inspect architecture_compatibility and warnings:
missing documentation means support is unknown, and a documented architecture
still needs a serving test. See the
manifest reference.
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.10-vllm-python-py3 |
vLLM | 120 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.
For maintainers, after changing compatibility.json or the reviewed rules in
dependency-profiles.json, rebuild and verify the packaged snapshot from the
repository root:
python scripts/update_compatibility.py --offline
python scripts/update_compatibility.py --check
This rebuilds src/triton_hf_builder/dependency_profiles.json from the saved
inputs without fetching new upstream data. Do not edit that generated file
directly. Normal package users do not need to run these commands.
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.
Serving wheel selection
CPU serving requires an exact Torch version from an image profile or
--requirement 'torch==<version>'; bare version pins become +cpu.
Explicit build labels are preserved; GPU serving rejects CPU-only pins.
Unpinned GPU dependencies still need validation in the serving image.
Install the generated requirements.txt to retain its wheel sources, or pass
requirements, package_indexes and package_find_links from serving.json.
Custom builds need their own source. Compatible image packages can be reused
when the install environment exposes them; differing pins require installation.
Metadata
Release files for triton-hf-builder 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| triton_hf_builder-0.1.5.tar.gz | 100.9 kB | With provenance | Details for triton_hf_builder-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| triton_hf_builder-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for triton_hf_builder-0.1.5-py3-none-any.whl |
Total release size: 135.2 kB
Release files / triton_hf_builder-0.1.5.tar.gz
| Download URL | triton_hf_builder-0.1.5.tar.gz |
|---|---|
| Size | 100.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
09ddd41da966131d71bcf4b17959b902660853dd007cbd3b92a39fdd53d92662
|
|
BLAKE2b-256 checksum How to use checksums |
7375d94d1dd242f7c27698641c7d2f7b47f2e790c3f3fc5b36ce315d94920481
|
| 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 10, 2026.
Transparency logRelease files / triton_hf_builder-0.1.5-py3-none-any.whl
| Download URL | triton_hf_builder-0.1.5-py3-none-any.whl |
|---|---|
| Size | 34.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9739d8da90439aafac8ba14c74744acf8a7ff02b486c4a69b918d57aa5fa8c40
|
|
BLAKE2b-256 checksum How to use checksums |
455fc5c628c1e70b9c2d7241aa37f4ac6b5c6e743f7f04654e020a3b58451f4c
|
| 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 10, 2026.
Transparency logSecurity for triton-hf-builder 0.1.5
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.
Attestation for triton_hf_builder-0.1.5.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 10, 2026.
Transparency logA 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.