1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to LLMs in Python

Connected

Exercise

Tokenizing text

You want to leverage a pre-trained model from Hugging Face and fine-tune it with data from your company support team to help classify interactions depending on the risk for churn. This will help the team prioritize what to address first, and how to address it, making them more proactive.

Prepare the training and test data for fine-tuning by tokenizing the text.

The data AutoTokenizer and AutoModelForSequenceClassification have been loaded for you.

Instructions

100 XP
  • Load the pre-trained model and tokenizer in preparation for fine-tuning.
  • Tokenize both the train_data["interaction"] and test_data["interaction"], enabling padding and sequence truncation.