Fine tuning large language models for hate speech detection in Hinglish and code mixed custom dataset through a socially responsible approach for safer digital platforms

This paper presents an extensive review and experimental framework for hate speech detection using large language models (LLMs). We explored traditional machine learning approaches and illustrated how state-of-the-art LLMs, such as BERT variants (DistilBERT and ModernBERT) and recent developments, such as DeepSeek R1, Llama 3, Gemma 3, Mistral, and Phi 3.5, enhance text classification performance. In this study, we evaluated the effectiveness of various large language models (LLMs) for Hindi–English code-mixed hate speech detection. We constructed a custom dataset using Reddit posts on social media, which were auto-labeled and subsequently verified and validated by expert annotators. LoRa adapters were used for model fine-tuning and in-domain performance evaluation of the model, with precision, recall, F1-score, and accuracy as metrics. To ensure a fair comparison, all the models were trained for the same number of epochs under the same training conditions. According to our findings, DeepSeek R1 outperformed larger general-purpose LLMs, such as Llama 3 and Gemma 3, with smaller margins. DeepSeek R1 surpassed the other models with the highest accuracy of 79 percent, demonstrating a better understanding of the complexity of code-mixed hate speech detection. These results indicate that lightweight, responsibly fine-tuned LLMs can strengthen moderation for multilingual, code-mixed communities without prohibitive computing costs. In practice, the approach offers a clear path towards safer, more inclusive platforms by pairing accuracy with bias-aware development and human oversight.

Authors

Institutions

Publication Details

Journal
Discover Sustainability
Published
2025-12-22
DOI
https://doi.org/10.1007/s43621-025-02190-w
Primary Topic
Hate Speech and Cyberbullying Detection
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Fine tuning large language models for hate speech detection in Hinglish and code mixed custom dataset through a socially responsible approach for safer digital platforms

Bhawani Singh Rathore, Sandeep Chaurasia
Discover Sustainability
Hate Speech and Cyberbullying Detection
article

Fine tuning large language models for hate speech detection in Hinglish and code mixed custom dataset through a socially responsible approach for safer digital platforms

Bhawani Singh Rathore, Sandeep Chaurasia
article en

Abstract

This paper presents an extensive review and experimental framework for hate speech detection using large language models (LLMs). We explored traditional machine learning approaches and illustrated how state-of-the-art LLMs, such as BERT variants (DistilBERT and ModernBERT) and recent developments, such as DeepSeek R1, Llama 3, Gemma 3, Mistral, and Phi 3.5, enhance text classification performance. In this study, we evaluated the effectiveness of various large language models (LLMs) for Hindi–English code-mixed hate speech detection. We constructed a custom dataset using Reddit posts on social media, which were auto-labeled and subsequently verified and validated by expert annotators. LoRa adapters were used for model fine-tuning and in-domain performance evaluation of the model, with precision, recall, F1-score, and accuracy as metrics. To ensure a fair comparison, all the models were trained for the same number of epochs under the same training conditions. According to our findings, DeepSeek R1 outperformed larger general-purpose LLMs, such as Llama 3 and Gemma 3, with smaller margins. DeepSeek R1 surpassed the other models with the highest accuracy of 79 percent, demonstrating a better understanding of the complexity of code-mixed hate speech detection. These results indicate that lightweight, responsibly fine-tuned LLMs can strengthen moderation for multilingual, code-mixed communities without prohibitive computing costs. In practice, the approach offers a clear path towards safer, more inclusive platforms by pairing accuracy with bias-aware development and human oversight.

Discover SustainabilityVol. 6(1)
University of Rajasthan (IN)
Peace, Justice and strong institutions
Openalex Percentile: Top 19%
Hate Speech and Cyberbullying Detection
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.