Get startedGet started for free

Setting up training arguments

After tokenizing your customer support interactions, you need to set up your training arguments before you can fine-tuned a pre-trained model.

TrainingArguments has been loaded for you.

This exercise is part of the course

Introduction to LLMs in Python

View Course

Exercise instructions

  • Set up an instance of TrainingArguments().
  • Set the evaluation strategy as "epoch".
  • Specify three training epochs.
  • Set the batch sizes for both training and evaluation as three.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Set up an instance of TrainingArguments
training_args = ____(
  output_dir="./finetuned",
  # Set the evaluation strategy
  ____,
  # Specify the number of epochs
  ____=3,
  learning_rate=2e-5,
  # Set the batch sizes
  ____=3,
  ____=3,
  weight_decay=0.01
)
Edit and Run Code