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

Connected

Exercise

Specify the TrainingArguments

You're configuring the training process for your language model. TrainingArguments specifies input parameters for Trainer. This exercise provides values for these parameters; generally, you'll have to tune the parameters for a model. Prepare the arguments for your model to use Trainer!

Some data has been pre-loaded:

  • output_dir is a pre-defined directory
  • The TrainingArguments class has been imported

Instructions

100 XP
  • Define training_args using the TrainingArguments class.
  • Set the learning_rate to 2e-5 to fine-tune pre-trained weights of your model.
  • Set the per device train batch size on each device to 16.
  • Set the evaluation checkpoints for every "epoch".