How you develop a model
Truss combines runtime configuration, optional Python code, and CLI commands:- Configuration only. Use
config.yamlto declare the GPU, dependencies, base image, and weights. Many open-source LLMs require no custom serving code. See Configuration and Dependencies. - Custom Python. Add
model/model.pywhen you need preprocessing, postprocessing, or model logic that configuration cannot express. The PythonModelclass definesloadandpredict. See The Model class. - Development CLI. Use
truss push --watchto create a development deployment,truss watchto sync changes, andtruss push --promoteto ship to production. See The development loop.
Pick a starting point
- Config-only: Deploy a model from a single
config.yaml. Start with Build your first model. - Custom Python: Write a
Modelclass with__init__,load, andpredict. Start with The Model class. - Custom Docker: Bring your own container. See Custom Docker servers.

The development cycle
Whichever approach you choose, the development cycle is the same: create a development deployment, sync local changes, then publish an immutable deployment for production traffic.- Push to development. Run
truss push --watchto create a single-replica development deployment with live reload. - Iterate with live reload. Run
truss watchto sync local changes without rebuilding the container. Edit a file, save it, and review the result in the deployment logs. - Publish to production. Run
truss pushto create an immutable, production-ready deployment with full autoscaling. Promote it to an environment for a stable endpoint URL that doesn’t change between versions.