Classifies a Kirundi (Ikirundi, run) news article into one of 10 topics:
politics, sport, economy, health, education, entertainment, relationship, technology, environment, culture.
The official KIRNEWS split leaks: all 923 test articles also occur in the training set. We pooled train+test, removed exact and near-duplicates, removed articles with conflicting labels and dropped classes with fewer than 25 unique articles (history, religion). This gives 1,742 articles, split stratified 70/15/15 (1,219 / 261 / 262).
Fine-tuned for 8 epochs (best epoch by validation macro-F1: 6) with lr 3e-5, effective batch size 16, max length 512 subword tokens, class-weighted cross-entropy and frozen word embeddings (86M of 278M parameters trained). Seed 42, Apple M1 Pro (MPS).
| Evaluation set | Accuracy | Macro-F1 |
|---|---|---|
| KIRNEWS held-out test (262 articles, 10 classes) | 0.897 | 0.795 |
| MasakhaNEWS-run (1,525 BBC Gahuza articles, 5 overlapping classes, out-of-distribution) | 0.872 | 0.799 |
A TF-IDF + linear SVM baseline reaches 0.908 / 0.833 in-domain but drops to 0.801 / 0.722 out-of-distribution.
from transformers import pipeline
clf = pipeline("text-classification", model="ReneNtabana/kirundi-news-classifier")
clf("umukino w'umupira w'amaguru wahuje intamba mu rugamba na ...".lower())
Lower-case the text and normalise apostrophes (’ → ') as during training.
model.safetensors 1.0 GiBonnx/model_quantized.onnx 266 MiBDavlan/afro-xlmr-base