Baseten provides two core development workflows: developing a model with Truss and orchestrating models with Chains. Both are building blocks for production-grade ML systems, but they solve different problems.

Truss vs. Chains: When to use each

Developing a model with Truss

Truss is the open-source package you use to turn any ML model into a production-ready API on Baseten - without needing to learn Docker or build custom infrastructure.

Use Truss when:

  • You’re deploying a single model. Whether it’s a fine-tuned transformer, diffusion model, or traditional classifier, Truss helps you package it with code, configuration, and system requirements to deploy at scale.

  • You want flexibility across tools and frameworks. Build with your preferred model frameworks (like PyTorch, transformers, and Diffusers), inference engines (like TensorRT, VLLM, and TGI), and serving technologies (like Triton)—plus any package installable via pip or apt.

  • You need control over how your model runs. Define pre- and post-processing, batching, logging, and custom inference logic. Truss gives you full access to environment settings and dependencies, versioned and deployable.

  • You want to keep development local and reproducible. Develop locally in a containerized environment that mirrors production, test confidently, and ship your model without surprises.

Orchestrating with Chains

Chains are for building inference workflows that span multiple steps, models, or tools. You define a sequence of steps — like routing, transformation, or chaining outputs — and run them as a single unit.

Use Chains when:

  • You’re combining multiple models or tools. For example, running a vector search + LLM pipeline, or combining OCR, classification, and validation steps.

  • You want visibility into intermediate steps. Chains let you debug and monitor each part of the workflow, retry failed steps, and trace outputs with ease — something that’s much harder with a single model endpoint.

  • You’re using orchestration libraries like LangChain or LlamaIndex. Chains integrate natively with these frameworks, while still allowing you to insert your own logic or wrap Truss models as steps.