truss
A seamless bridge from model development to model delivery
What it is and what it does
Truss is a deployment-focused CLI that bridges the gap between local model development and production serving. It wraps your model code, weights, and dependencies into a containerized service that behaves consistently across development and production environments. The tool abstracts away Docker, Kubernetes, and infrastructure configuration—you write a YAML config specifying the model source, hardware (GPU type), and serving engine, then push to deploy.
The package integrates with Baseten's inference stack and supports multiple serving frameworks including vLLM, SGLang, TensorRT-LLM, transformers, diffusers, PyTorch, and TensorFlow. It handles GPU allocation, secrets management, caching, and autoscaling when deployed to Baseten or compatible infrastructure. The live-reload feature lets you iterate on config changes without full rebuilds, and deployed models expose OpenAI-compatible REST APIs by default.
Use it for:
- Deploy a Hugging Face transformer model to a production API endpoint with GPU acceleration and automatic scaling
- Package a custom PyTorch or TensorFlow model with preprocessing logic and serve it via an OpenAI-compatible interface
- Iterate rapidly on model serving config (quantization, sequence length, hardware) with live reload during development
- Manage model dependencies and weights in a single reproducible package that works identically in dev and production
- Optimize inference performance using TensorRT-LLM compilation for large language models without manual container setup
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Truss is a CLI tool for packaging ML models with their serving logic and deploying them to production, handling containerization, dependency management, and GPU configuration automatically.
Yes. Truss is actively maintained, has no known vulnerabilities, and low install friction. It's worth installing if you need to deploy ML models to production and want to skip Docker/Kubernetes boilerplate. Best suited for teams using Baseten or those comfortable with containerized deployments; verify first whether your target infrastructure is supported.
Install
truss on PyPI
pip
pip install trussuv
uv add trusspoetry
poetry add trussInstalling truss
Before you install
Low install friction with a pure-Python wheel. Active maintenance (last commit 2026-08-13) and 1188 repository stars indicate steady development. Supports Python 3.9 through 3.14.
License in practice
MIT license permits commercial and private use with minimal restrictions, making it suitable for production deployments without licensing concerns.
Quickstart
pip install truss
truss init my-model
cd my-model
# Edit config.yaml with model and hardware specs
truss push # Deploy to Baseten or your infrastructure
Requires a Baseten account and API key for deployment, or compatible infrastructure. Models are deployed via containerization, not run locally by default.
Verify before relying
- Whether Truss can deploy models to infrastructure other than Baseten without additional configuration
- Performance overhead of the Truss serving layer compared to direct framework deployment
- Supported model frameworks beyond those mentioned (vLLM, SGLang, TensorRT-LLM, transformers, diffusers, PyTorch, TensorFlow)
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<3.15,>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 28 — aiofiles, blake3, boto3, click, google-cloud-storage, httpx-ws, httpx, huggingface-hub, inquirerpy, jinja2, keyring, libcst, loguru, packaging, pathspec, psutil, pydantic, python-json-logger, python-on-whales, pyyaml, requests, rich-click, rich, ruff, tenacity, tomlkit, truss-transfer, watchfiles |
| Maintenance | actively maintained — 11 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,327,555/month — #4,052 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: truss-0.18.25-py3-none-any.whl
Keywords: AI, MLOps, Machine Learning, Model Deployment, Model Serving
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
sagemaker-serveProvides model serving and deployment…
permissive · top 5,000 on PyPI
tensorflow-serving-apiProvides Python client APIs to communicate with…
permissive · top 5,000 on PyPI
bentomlBentoML is a Python framework for building and…
permissive · top 15,000 on PyPI
truss-transferDownloads and resolves Baseten Pointers (bptr)…
unclear · top 15,000 on PyPI
jinaJina is a framework for building and deploying…
permissive · top 15,000 on PyPI
outerboundsOuterbounds is the main platform package that…
unclear · top 15,000 on PyPI
tectonTecton is a Python SDK for defining, testing,…
unclear · top 5,000 on PyPI
sglangSGLang is a serving framework that runs large…
permissive · top 1,000 on PyPI
sagemaker-inferenceProvides a model serving stack for deploying…
permissive · top 15,000 on PyPI
cogCog packages machine learning models into…
permissive · top 5,000 on PyPI