Infinitic AI — Urdu News Headline Classifier (Stage 1)
Fine-tuned xlm-roberta-base for 4-class Urdu news headline classification.
Labels: sports, business, entertainment, technology
Built by Infinitic AI. Selection used validation macro-F1 only; the test split was scored once after the finalist was declared.
Results
| Split | Macro-F1 | Accuracy | Notes |
|---|---|---|---|
| Validation (best epoch 46) | 0.9481 | — | Used for model selection |
| Test (sealed, once) | 0.9384 | 0.9579 | 11,252 headlines |
Test per-label F1
| Label | Precision | Recall | F1 | Support |
|---|---|---|---|---|
| sports | 0.9778 | 0.9810 | 0.9794 | 4531 |
| business | 0.9618 | 0.9754 | 0.9686 | 2401 |
| entertainment | 0.9533 | 0.9360 | 0.9446 | 3531 |
| technology | 0.8532 | 0.8695 | 0.8613 | 789 |
Same-split baselines (validation macro-F1): majority 0.1437, TF-IDF+logistic 0.9230, best LoRA 0.9395.
Try the demo
Live browser demo (no token): infinitic-urdu-headline-classifier.
This fine-tune is not on Hugging Face serverless Inference Providers (hf-inference), so the Space runs quantized ONNX in-browser with Transformers.js. Files: onnx/model_quantized.onnx.
How to use
from transformers import pipeline
clf = pipeline(
"text-classification",
model="HammadHARahim/urdu-headline-stage1-cosine",
)
print(clf("پاکستان کرکٹ ٹیم نے میچ جیت لیا"))
Training details
| Setting | Value |
|---|---|
| Base model | xlm-roberta-base |
| Strategy | Full fine-tune |
| Peak learning rate | 2e-5 |
| Schedule | 10% warmup, half-cosine for 20 epochs, then constant 2e-6 |
| Weight decay | 0.01 |
| Loss | Unweighted cross-entropy |
| Batch size / max length / seed | 32 / 64 / 42 |
| Epochs scored / best epoch | 48 / 46 |
| Hardware | Kaggle Tesla T4 |
Data: Urdu News Dataset 1M (Mendeley v3). Split 80/10/10 by normalized-content hash, seed 42. Non-commercial research use; credit news sources.
Intended use
- Auto-tagging Urdu news headlines into the four Stage 1 categories.
- Media ops / newsroom routing demos and research.
Out of scope / limitations
- Not trained for politics, health, or world news (Stage 2 labels).
- Not a fake-news detector.
- Technology is the smallest class and the weakest label.
- Section labels in the source corpus can contain noise.
- Corpus license is non-commercial research; check terms before production use.
Links
- Code: GitHub
- Company: Infinitic AI