Learn how to pass a model to the Trainer class.
model
is the main Module
that all training and validation is run on. It’s required by all Trainer
instances.
model
argument to set the model you’d like to train or validate.
When using YAML, pass all model
subkeys as arguments to the model class. Your run script’s model_fn
determines the model class.
In Python, you can specify the model in two ways:
Module
Module
that the system uses directlyModule
directly, initialize the model inside the Cerebras device context for optimal performance: