Downloads · 30 days
0
JohnAlbarkaIbrahim/afroxlmr-mini-nigerian-sentiment
afroxlmr-mini-nigerian-sentiment is a text classification model from JohnAlbarkaIbrahim. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
Fine-tuned sentiment-classification model based on Davlan/afro-xlmr-mini.
Downloads · 30 days
0
Access
Public
Updated Aug 23, 2026
Repo size
9.1 GB
Likes
0
Public
Click a slice to open those files.
.pt5.6 GB · 55%
From the Hugging Face model README
Fine-tuned sentiment-classification model based on
Davlan/afro-xlmr-mini.
The model is designed for sentiment classification of Nigerian English, Nigerian Pidgin, Hausa, Igbo, and Yoruba, with additional domain adaptation using consented real-world WhatsApp conversations.
Three-class sentiment classification:
positivenegativeneutralDavlan/afro-xlmr-mini
The base model is used independently in another part of the project for multilingual vector embedding generation.
This repository contains the fine-tuned sentiment classifier. It should not be used as the embedding model.
The training corpus contains 140,256 examples across:
| Language | Samples |
|---|---|
| English | 76,706 |
| Hausa | 22,152 |
| Igbo | 15,715 |
| Pidgin | 10,556 |
| Yoruba | 15,127 |
| Total | 140,256 |
The training pipeline applies language-balanced sampling during fine-tuning so that the dominant English corpus does not overwhelm the lower-resource Nigerian languages.
An additional 1,058 consented and anonymized WhatsApp messages were used for domain adaptation.
| Language | Samples |
|---|---|
| English | 500 |
| Pidgin | 498 |
| Mixed English/Pidgin | 60 |
| Total | 1,058 |
The WhatsApp dataset contains anonymized conversational text and was collected with participant consent.
The model was trained in two stages:
others training corpus.The WhatsApp test set was kept separate from training.
Evaluation artifacts and benchmark results are provided in:
v1/results/
The results include evaluation information from the multilingual test sets and the held-out WhatsApp test set.
Metrics include class-level and aggregate classification metrics where available.
This repository contains several deployment formats:
v1/
├── final_model/ # Hugging Face Transformers model
├── onnx/ # ONNX model
├── onnx_int8/ # Dynamically quantized INT8 ONNX model
├── results/ # Evaluation and benchmark artifacts
└── deployment/ # Deployment-related files
For CPU-based production inference, the recommended artifact is:
v1/onnx_int8/
Intended Use
This model is intended for:
Nigerian social-media sentiment analysis
Nigerian conversational text analysis
WhatsApp-style sentiment classification
Research involving low-resource African languages
CPU-efficient sentiment inference in backend services
Limitations
Performance may vary substantially across languages, dialects,
code-switching patterns, spelling variations, slang, emojis, and
informal conversational expressions.
The WhatsApp domain-adaptation corpus is substantially smaller than
the general multilingual corpus. Results should therefore not be
interpreted as representing all Nigerian WhatsApp conversations.
The model should not be used for high-stakes decisions involving
individuals.
Privacy
The WhatsApp domain-adaptation data was anonymized before training
and was collected with participant consent.
No personally identifying information should be inferred from the
published model or artifacts.
Deployment
The INT8 ONNX model is intended to be loaded using ONNX Runtime,
making it suitable for CPU inference in a FastAPI backend.
The sentiment classifier is architecturally separate from the
project's AfroXLMR embedding model.
Citation
If you use this model in research or a project, please cite this
repository and the original AfroXLMR-mini model.