Interfaces & Logic
About
The d9d training loop is agnostic to the specific model or data being trained. You interact with the loop by implementing Providers (factories) and Tasks (step logic).
For standard use cases (like standard Optimizers), d9d provides Auto implementations that can be configured purely via Pydantic models, avoiding the need to write custom provider classes.
Navigation
- User Tasks: See how to implement
TrainTaskandInferenceTaskto define your custom step logic, manipulate batch inputs, pass data across pipeline states, and compute losses. - Model Definition: Learn how to implement
ModelProviderto initialize models, handle state mapping, and configure horizontal parallelism. - Data Loading: Understand the
DatasetProviderfor instantiating datasets, managing data collation, and configuring distributed-aware sharding. - Events & Hooks: Discover how to hook into specific moments of the train or inference lifecycle using the declarative Event Bus.
- Optimizers: Learn about the
AutoOptimizerProviderfor easy Pydantic-based configuration of standard optimizers, or how to write your ownOptimizerProvider. - Learning Rate Scheduler: Explore the
AutoLRSchedulerProviderfor piecewise scheduling (warmup, hold, decay) or the customLRSchedulerProviderinterface.