ComeçarComece gratuitamente

Setting up the trainer

With training arguments set up, you need to move on to the trainer before putting the fine-tuned model to use.

TrainingArguments and Trainer have been loaded for you, as well as your previous model, tokenizer and training_args.

Note: actual training has been disabled for this exercise so that it runs faster.

Este exercício faz parte do curso

Introduction to LLMs in Python

Ver Curso

Instruções de exercício

  • Set up the Trainer() object.
  • Assign the previously defined training arguments and tokenizer.
  • Train the model.

Exercício interativo prático

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

# Set up the trainer object
trainer = ____(
    model=model,
    # Assign the training arguments and tokenizer
    ____,
    train_dataset=tokenized_training_data,
    eval_dataset=tokenized_test_data,
    ____
)

# Train the model
____
Editar e executar código