Robust sentiment classification of bangla social media texts using fine-tuned LLaMA models and voting-based inference
The growing volume of harmful and abusive content on Bangla-language social media platforms highlights the need for sentiment-classification tools specifically designed for morphologically complex, low-resource languages. In this study, we benchmark six transformer-based models: four multilingual or Bangla-native encoder-only language models (multilingual BERT, XLM-RoBERTa, multilingual DeBERTa-v3, and the Bangla-native BanglaBERT), and two autoregressive LLaMA decoder models (LLaMA 3.1-8B and LLaMA 3.2-1B). Models are evaluated on a manually cleaned and label-corrected dataset derived from 50,000 Facebook comments (48,521 retained after preprocessing). We adapt the LLaMA models with Low-Rank Adaptation (LoRA) combined with 4-bit quantisation (QLoRA), employ prompt-based conditioning, and stabilise inference through a voting strategy over $$N\!=\!10$$ decoding samples drawn from five prompt templates. LLaMA 3.2-1B fine-tuned with LoRA and voting-based inference achieves the best overall performance, with an accuracy of $$82.0\%\pm 0.4$$ and a macro F1-score of $$0.85\pm 0.01$$ (mean over five independent seeded runs), significantly outperforming all encoder baselines (paired bootstrap, p < 0.01). Class-wise metrics and confusion matrices further show that this method yields notably improved precision on the under-represented sexual and threat categories, underscoring the value of lightweight large language model (LLM) fine-tuning for low-resource, imbalanced sentiment classification tasks.
Authors
- Sadia Jaman (ORCID: https://orcid.org/0000-0001-8807-4271)
- Al Fassi
- Mohammad Abdul Qayum (ORCID: https://orcid.org/0000-0002-4434-4345)
- Abu Mukaddim Rahi
- M.F.R. Siam (ORCID: https://orcid.org/0009-0005-6112-9718)
- Nafis Ismam
- Mohammed Mafizul Islam
Institutions
- North South University (BD)
- Dhaka University of Engineering & Technology (BD)
- Bay Atlantic University (US)
- Université de Kisangani (CD)
Publication Details
- Journal
- Scientific Reports
- Published
- 2026-11-30
- DOI
- https://doi.org/10.1038/s41598-026-77574-7
- Primary Topic
- Sentiment Analysis and Opinion Mining
- Type
- article
- Field-Weighted Citation Impact
- 0.00