BERT News Classifier

Predicts Business, Sports, or Technology from English news. Technology is AG News Sci/Tech, including science. World is excluded. Trained on 9000 balanced examples for 1 epoch(s). Validation rows: 900. Held-out test rows: 5699. Test accuracy: 0.9340. Test macro F1: 0.9340.

Architecture: bert-base-uncased final CLS embedding, dropout, Linear(768, 3). Preprocessing: lowercase, HTML/URL/noise cleanup, maximum 128 tokens. Cross entropy on logits during training; softmax at inference. This repository uses the custom NewsClassifier class in news_model.py; load with NewsClassifier.from_pretrained, not the standard AutoModel classifier. The companion app.py shows the complete loading and preprocessing workflow.

Limitations: English only; old news training data; three forced categories; long text is truncated; softmax scores are not calibrated confidence. See metrics.json for results and training settings.

Downloads last month
14
Safetensors
Model size
0.1B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train bluehinox/news-classifier