ComeçarComece de graça

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.

Este exercício faz parte do curso

Reinforcement Learning from Human Feedback (RLHF)

Ver curso

Instruções do exercício

  • 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.

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

# Define the train and test datasets
training_dataset = ____
testing_dataset = ____

# Initialize the trainer class
trainer = ____(
# Add arguments to the class
    model=model,
    args=training_args,
    train_dataset=____,
    eval_dataset=____
)
Editar e executar o código