When Smaller Teachers Win: A Distillation-Quantization Pipeline for Efficient Hate Speech Detection in a Low-Resource Language, Bangla
Transformer encoders can be costly to run in the mobile and edge settings where Bangla content is moderated. We studied how the choice of teacher and numerical precision affects compact classifiers on a public corpus of 16,407 Bangla comments. We benchmarked three teachers and four students on the same five stratified folds. On each teacher's selected fold, we compared all four students before and after logit distillation, then evaluated each distilled student in FP16, NF4 INT4, and dynamic INT8. A 13.7 million parameter encoder came within 0.0091 macro F1 of the 278 million parameter XLM-RoBERTa in the five-fold benchmark. Distillation improved macro F1 and ROC-AUC in all twelve pairs. Students surpassed their teacher in three pairs and matched it to within 0.05% in three more. The monolingual Bangla teacher ranked lowest in standalone macro F1 but produced the highest mean recovery and the strongest distilled student, an 18.2 million parameter SahajBERT at 0.8626 macro F1. This pattern motivates evaluating language-specific teachers alongside higher-scoring multilingual ones. At their recorded thresholds, FP16 and FP32 differed by 0.0034 macro F1 on average in absolute terms. NF4 scores were within 0.016 of FP32 in all twelve pairs. NF4 reduced the three measured student footprints about fourfold. SahajBERT reached 0.8623 macro F1 under NF4. Its 16.5 MiB footprint was one thirty-eighth of its teacher's. An independently trained SahajBERT reached 0.8336 macro F1 and 0.9186 ROC-AUC on 2,350 held-out comments grouped by exact text.
Authors
- Saif Siddique (ORCID: https://orcid.org/0000-0003-0300-1087)
- Md. Abdur Rakib Mollah
- Md. Sultanul Islam Ovi (ORCID: https://orcid.org/0009-0003-0516-950X)
- Ann Naser Nabil (ORCID: https://orcid.org/0009-0006-3561-045X)
- Rakib Ullah (ORCID: https://orcid.org/0009-0003-7239-9313)
- Shamazda Islam (ORCID: https://orcid.org/0009-0006-4111-3484)
Institutions
- George Mason University (US)
- Rajshahi University of Engineering and Technology (BD)
- Sylhet Engineering College (BD)
- Jahangirnagar University (BD)
- BRAC University (BD)
Publication Details
- Journal
- Research Square
- Published
- 2026-11-30
- DOI
- https://doi.org/10.21203/rs.3.rs-11899099/v1
- Primary Topic
- Hate Speech and Cyberbullying Detection
- Type
- preprint