Banglish Cyberbullying Detection
A research project that fine-tunes a 4-bit-quantized small language model to detect cyberbullying in Banglish (Bengali written in Latin script), sized to run offline and on-device without sending messages to a server.
The problem
Bengali-speaking communities use Banglish on social platforms, and existing English-trained moderation models miss it entirely. Sending posts to a cloud classifier raises privacy and latency concerns.
What fine-tuning bought
QLoRA fine-tuning of the 4-bit Qwen2.5-1.5B model, measured on a 618-example held-out Banglish test set: base model vs fine-tuned.
Architecture
- Parameter-efficient fine-tuning (QLoRA) of Qwen2.5-1.5B-Instruct quantized to 4-bit with bitsandbytes, small enough to target a 3–4 GB-RAM phone instead of a cloud GPU
- A code-mixed Banglish text pipeline (emoji + regex normalisation over transliterated Bengali) for the orthographic variation that standard Bengali-Unicode models like BanglaBERT and mBERT miss
- Evaluated as a base-vs-fine-tuned comparison on a 618-example held-out test set, with confusion matrices and a metrics CSV
- Designed for offline, on-device inference (no server round-trip), for privacy and low latency on unreliable mobile networks: the deployment target the 4-bit quantization makes feasible
Highlights
Fine-tuning that nearly doubled accuracy
QLoRA fine-tuning lifted the 1.5B model from 44% to 87% accuracy (F1 0.54 → 0.80) on the held-out Banglish test set.
Banglish-native NLP
Targets Bengali written in Latin script, the code-mixed, phonetic spelling that English- and formal-Bengali-trained moderation models miss entirely.
Built for the edge, not the cloud
4-bit quantization sizes the model for offline, on-device classification, so messages never leave the phone. That means better privacy and lower latency than a cloud classifier.
Impact
87%
Fine-tuned accuracy on the Banglish test set, up from 44% for the base model
0.80
F1 after QLoRA fine-tuning (base model: 0.54)
4-bit
Quantized 1.5B-parameter model, sized for offline on-device inference