YouTube04 Apr 2025
2h 15m

Build an LLM from Scratch 6: Finetuning for Classification

Podcast cover

Sebastian Raschka

In this coding along video, Sebastian Raschka discusses fine-tuning a pre-trained GPT model for practical applications, specifically email spam classification. He explains the process of preparing the dataset, setting up PyTorch data loaders, and modifying the model architecture for classification tasks, emphasizing the replacement of the output layer. He also touches on the importance of calculating classification loss and accuracy, and shares bonus materials, including additional experiments, application to a movie review dataset, and a simple user interface. The goal is to adapt the LLM for binary classification, predicting whether an email is spam or not, and sets the stage for instruction fine-tuning in the subsequent chapter.

Outlines

Part 1: Introduction and Data Preparation

Part 2: Data Loaders and Model Setup

Part 3: Fine-Tuning and Evaluation

Part 4: Application and Conclusion

Sign in to continue reading, translating and more.

Continue
 
mindmap screenshot
Preview
preview episode cover
How to Get Rich: Every EpisodeNaval