Trainer. The model is the main Module that all training and validation is run on. It is required by all Trainer instances.
Prerequisites
Make sure to have read through Trainer Overview and Trainer Configuration Overview which provide the basic overview of how to run Model Zoo models. In this document, you will be using the tools and configurations outlined in those pages.Configure the Model
To set the model to train/validate using theTrainer use the model argument.
If passing the This ensures that model parameters are automatically moved to the Cerebras device, optimizing memory usage and enhancing initialization speed. For more information, see Efficient weight initialization.
model as a Module directly, it is optimal to first initalize the model inside of the Cerebras device context.For example:Conclusion
That covers specifying the model to train/validate with theTrainer. You should now understand the various ways to configure the model and how the Trainer accepts a model.
Further Reading
To learn more about how you can use theTrainer in some core workflows, you can check out:
To learn more about how you can extend the capabilities of the Trainer class, you can check out:

