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.
Bu egzersiz
Introduction to LLMs in Python
kursunun bir parçasıdırEgzersiz talimatları
- Set up the
Trainer()object. - Assign the previously defined training arguments and tokenizer.
- Train the model.
Uygulamalı interaktif egzersiz
Bu örnek kodu tamamlayarak bu egzersizi bitirin.
# 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
____