Baseten

Building multi-component AI workflows at scale with Chains

Jul 2, 2024
Building multi-component AI workflows at scale with Chains
SummaryAI, from the source post

Introduced Baseten Chains, a Python framework for building and orchestrating multi-component AI workflows. Chains are composed of 'Chainlets', modular services that can be linked for real-time inference. Key design goals include a delightful developer experience with local testability and type-checking, computational expressivity for flexible graph structures, and extensibility by reusing Truss features. Chains address pain points with Truss such as YAML configuration disconnects, code organization restrictions, and challenging error detection. The framework enables Chainlets to declare dependencies using `chains.depends()` and defines a `run_remote()` method as the public API for inter-Chainlet communication. Deployment involves a CLI command that generates Pydantic models for serialization and creates 'stubs' for remote instances, transforming Chainlets into FastAPI servers deployed on Baseten with autoscaling and dedicated hardware.

More from the Agentic Code Transformation and Model Orchestration trail