LoslegenKostenlos loslegen

Fine-tuning Llama for customer service QA

You work at a company that builds customer service chatbots. Your team uses the Llama models in your customer service bot, and you want to improve the model by fine-tuning on a question-answering dataset related to customer service. To ensure the best performance out of these models, your team will fine-tune a Llama model for this task using the bitext dataset.

The training script is already almost complete, the only thing missing is the final step where you bring together the model, tokenizer, training dataset, and training arguments and start training.

Diese Übung ist Teil des Kurses

Fine-Tuning with Llama 3

Kurs anzeigen

Anleitung zur Übung

  • Import the class that lets you conduct supervised fine-tuning from its library.
  • Instantiate the class used for supervised fine-tuning by passing the model, tokenizer, dataset, and training_arguments.
  • Run the instance method to start fine-tuning your model.

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

# Import the supervised fine-tuning class
from ____ import ____

# Instantiate fine-tuning class
trainer = ____(
  	# Pass necessary arguments
    ____=____,
    ____=____,
    ____=____,
    ____=____,

)

# Start training 
trainer.____()
Code bearbeiten und ausführen