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.
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="transformers",
image="nvcr.io/nvidia/tritonserver:26.06-py3",
device="cpu",
)
print(result.model_directory / "config.pbtxt")
No manual requirements needed: the builder writes runtime defaults into
requirements.txt. Optional overrides, all parameters and return values are
explained in the Python API.
The equivalent CLI:
triton-hf inspect /workspace/hf-checkpoint
triton-hf build /workspace/hf-checkpoint \
--output /workspace/model_repository --name my_model \
--runtime transformers --device cpu \
--image nvcr.io/nvidia/tritonserver:26.06-py3
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 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.2
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.2.tar.gz | 77.3 kB | With provenance | Details for triton_hf_builder-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| triton_hf_builder-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for triton_hf_builder-0.1.2-py3-none-any.whl |
Total release size: 102.5 kB
Release files / triton_hf_builder-0.1.2.tar.gz
| Download URL | triton_hf_builder-0.1.2.tar.gz |
|---|---|
| Size | 77.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
65cfa36319746e6dad2f350b84f709ca4c72f7bbd3b261cebe46680bda2b78b6
|
|
BLAKE2b-256 checksum How to use checksums |
eb4336052314d191c990d1477d263e5d29f085747d3c53382408f7282baf98a2
|
| 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 Oct 30, 2026.
Transparency logRelease files / triton_hf_builder-0.1.2-py3-none-any.whl
| Download URL | triton_hf_builder-0.1.2-py3-none-any.whl |
|---|---|
| Size | 25.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c698c55b00cef437976ff86eef5a630b9fb7ae9bdbd1677f2e02a6bc52ed0c48
|
|
BLAKE2b-256 checksum How to use checksums |
297e8ba3ef18365dcddc866c72e8429f10b9363dd75bf90bb0aac5d0ab36288d
|
| 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 Oct 30, 2026.
Transparency logSecurity for triton-hf-builder 0.1.2
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.2.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 Oct 30, 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.