Downloads · 30 days
9
6% of all-time downloads
kelvinmbewe/ZambiaSocialBERT
ZambiaSocialBERT is a text classification model from kelvinmbewe. Use it when you need a label for a piece of text. The card lists the license as apache-2.0.
language: - en - bem - nya license: apache-2.0 basemodel: google-bert/bert-base-multilingual-cased tags: - text-classification - language-identification - low-resource - zambia - code-switching ---
Downloads · 30 days
9
6% of all-time downloads
All-time downloads
143
Public
Parameters
181M
458 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors229 MB · 98%
How the weights are stored.
F1692.3M · 51%
From the Hugging Face model README
language:
ZambiaSocialBERT is a multilingual text classification model for Zambian social-media language. It is based on multilingual BERT (google-bert/bert-base-multilingual-cased) and adapted using QLoRA, a parameter-efficient fine-tuning method.
The model performs language identification on Zambian social-media text. It classifies an input text into one of five categories:
The noisy_social_media category captures highly informal, emoji-laden, conversational content, allowing the model to separate noisy social-media text from the four standard language categories.
google-bert/bert-base-multilingual-cased
The model was trained on a rebalanced Zambian social-media corpus of approximately 141,000 examples: around 35,000 examples for each of the four main language categories and 1,000 for the noisy_social_media category.
The model was adapted using QLoRA. The base encoder was loaded in 4-bit quantized form and frozen, with low-rank adapter layers trained on top and the classifier head unfrozen.
Quantization: 4-bit, NF4 quantization type, double quantization enabled, bfloat16 compute dtype.
LoRA configuration: rank (r) 8, alpha 16, dropout 0.05, target modules query, key, value, and dense, no bias, task type SEQ_CLS.
Training configuration: 6 epochs, learning rate 2e-5, cosine learning-rate scheduler, warmup ratio 0.1, per-device train batch size 24, gradient accumulation steps 6, weight decay 0.01, maximum gradient norm 0.5, paged AdamW 8-bit optimizer, bfloat16 mixed precision, gradient checkpointing enabled. The best checkpoint was selected on macro F1-score.
After training, the LoRA adapters were merged into the base encoder, so the published model has a standard mBERT architecture.
ZambiaSocialBERT was developed as part of a master's dissertation on multilingual Aspect-Based Sentiment Analysis for low-resource Zambian ride-hailing social-media discourse. Its adapted encoder is reused as the starting point for the ZambiaABSA model.




