1. Learn
  2. /
  3. Courses
  4. /
  5. Reinforcement Learning from Human Feedback (RLHF)

Connected

Exercise

Fine-tuning for review classification

Your project continues and you now want to classify the reviews as positive, neutral, or negative. You'll use a fine-tuned model to automatically categorize the reviews.

The TrainingArguments and Trainer classes have been imported from transformers. The training_args, model, and tokenized_datasets have also been pre-imported.

Instructions

100 XP
  • Create the train and test datasets using "train" and "test" subsets from the tokenized_datasets dataset.
  • Initialize the trainer class.
  • Add training arguments to the class.