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.
Deze oefening maakt deel uit van de cursus
Introduction to LLMs in Python
Oefeninstructies
- Set up the
Trainer()object. - Assign the previously defined training arguments and tokenizer.
- Train the model.
Praktische interactieve oefening
Probeer deze oefening eens door deze voorbeeldcode in te vullen.
# 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
____