1. Learn
  2. /
  3. Courses
  4. /
  5. Efficient AI Model Training with PyTorch

Connected

Exercise

AdamW with Accelerator

You want to customize your training loop using Accelerator and use AdamW as a benchmark optimizer for your language translation model. Build the training loop to use AdamW.

Some training objects have been pre-loaded and defined, including model, train_dataloader, and accelerator.

Instructions

100 XP
  • Prepare training objects for distributed training before the loop.
  • Update the model parameters in the training loop.