,
Eugénio Ribeiro
,
Fernando Batista
Creative Commons Attribution 4.0 International license
Addressing Online Hate Speech (OHS) in Portuguese faces significant challenges, including a lack of comprehensive, annotated data and classification frameworks, effective detection tools, and the high computational cost of Large Language Models (LLMs). This work evaluates the efficiency and competitiveness of seven smaller, more accessible LLMs (ranging from 3B to 27B parameters) through zero-shot classification with structured instructions, leveraging the expert-annotated test dataset and annotation scheme of the kNOwHATE project. Findings indicate that models such as Mistral Small 3.2 24B, Gemma 3 27B, and Phi-4 achieve competitive performance, balancing precision and recall, whilst remaining computationally affordable. While excelling in identifying direct and indirect hate speech, out-group derogation, and specific target groups, the models faced challenges in detecting subtle rhetorical devices and emotions. Analysis of the Cohen’s Kappa and F1-scores revealed moderate agreement with human annotators, highlighting the potential of optimised models to democratise OHS detection in resource-constrained settings, alongside the need for further refinement to bridge the gap in human-level nuance and improve generalisation. This study aims to broaden knowledge regarding the detection of OHS in Portuguese, by demonstrating a viable, competitive, and low-cost approach that does not rely on large-scale infrastructure or expensive proprietary models.
@InProceedings{cardoso_et_al:OASIcs.SLATE.2026.9,
author = {Cardoso, Mauro and Ribeiro, Eug\'{e}nio and Batista, Fernando},
title = {{Cost-Effective Hate Speech Detection in Portuguese Using Lightweight LLMs}},
booktitle = {15th Symposium on Languages, Applications and Technologies (SLATE 2026)},
pages = {9:1--9:16},
series = {Open Access Series in Informatics (OASIcs)},
ISBN = {978-3-95977-440-6},
ISSN = {2190-6807},
year = {2026},
volume = {144},
editor = {Batista, Fernando and Ribeiro, Eug\'{e}nio and Ribeiro, Ricardo and Santos, Andr\'{e} L.},
publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
address = {Dagstuhl, Germany},
URL = {https://drops.dagstuhl.de/entities/document/10.4230/OASIcs.SLATE.2026.9},
URN = {urn:nbn:de:0030-drops-267077},
doi = {10.4230/OASIcs.SLATE.2026.9},
annote = {Keywords: Hate Speech Detection, Zero-shot Classification, Lightweight Language Models}
}