ModernBERT — News Classifier
Fine-tuned ModernBERT for classifying news text into multiple categories.
- Base model: answerdotai/ModernBERT-large
- Task: Text classification
- Dataset: HuffPost News Category
- Input: headline + short description
- Output: predicted category (top-k supported)
Usage
from transformers import pipeline
classifier = pipeline(
"text-classification",
model="kurcontko/modernbert-news-classifier",
top_k=3
)
print(classifier("Apple unveils new AI models on latest iPhone"))
Evaluation
| Metric | Score |
|---|---|
| Accuracy | 0.72 |
| Macro F1 | 0.63 |
Evaluated on the validation split of the HuffPost News Category dataset.
Training
Max sequence length: 512
Batch size: 32
Epochs: 3
Early stopping enabled
Input was constructed as headline + short_description.
- Downloads last month
- 20
Model tree for kurcontko/modernbert-news-classifier
Base model
answerdotai/ModernBERT-largeDataset used to train kurcontko/modernbert-news-classifier
Evaluation results
- Accuracy on HuffPost News Categoryself-reported0.720
- Macro F1 on HuffPost News Categoryself-reported0.630