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.
Latihan ini adalah bagian dari kursus
Introduction to LLMs in Python
Petunjuk latihan
- Set up the
Trainer()object. - Assign the previously defined training arguments and tokenizer.
- Train the model.
Latihan interaktif praktis
Cobalah latihan ini dengan menyelesaikan kode contoh berikut.
# 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
____