Language models
News Headline Classifier
Fine-tune GPT-2 to sort headlines into politics, sports, technology, entertainment, and business.
The experiment selects five labels from the News Category Dataset, balances their representation, and tokenizes each headline for a sequence classifier.
A confusion matrix shows which topics the model confuses. The notebook also runs inference on new headlines so readers can inspect individual predictions.