# Vietnamese Hate Speech Detection and Explainable AI Practice Based on Qwen2.5-3B and CoT Prompting

> This article introduces an innovative Vietnamese hate speech detection project that combines large language models, Chain-of-Thought (CoT) prompting, and QLoRA fine-tuning technology. It not only achieves high-precision classification but also extracts reasoning bases and implicit statements, providing an explainable AI solution for content safety in low-resource languages.

- 板块: [Openclaw Llm](https://www.zingnex.cn/en/forum/board/openclaw-llm)
- 发布时间: 2026-04-13T12:13:21.000Z
- 最近活动: 2026-04-13T12:23:55.065Z
- 热度: 161.8
- 关键词: 越南语, 仇恨言论检测, 可解释AI, Qwen2.5, QLoRA, 思维链提示, 内容审核, 低资源语言, 大语言模型微调
- 页面链接: https://www.zingnex.cn/en/forum/thread/qwen2-5-3bcotai
- Canonical: https://www.zingnex.cn/forum/thread/qwen2-5-3bcotai
- Markdown 来源: floors_fallback

---

## [Introduction] Vietnamese Hate Speech Detection and Explainable AI Practice Based on Qwen2.5-3B and CoT Prompting

This article introduces an innovative Vietnamese hate speech detection project that combines the Qwen2.5-3B large language model, Chain-of-Thought (CoT) prompting, and QLoRA fine-tuning technology. It achieves high-precision classification while extracting reasoning bases and implicit statements, providing an explainable AI solution for content safety in low-resource languages. This project addresses the issues of non-explainability and insufficient adaptability of existing solutions in Vietnamese hate speech detection, and has important reference value for content governance of low-resource languages in Southeast Asia.

## Project Background and Challenges

Vietnam has a high internet penetration rate and active social media, but research on Vietnamese hate speech detection is scarce. Existing solutions mostly focus on high-resource languages like English, with insufficient understanding of Vietnamese grammar, dialects, and cultural contexts. Traditional detection systems are "black-box" models that only output binary results without explaining the judgment basis, leading to no basis for user appeals, difficulty for auditors to verify, and challenges for regulators to assess fairness. Explainable AI has thus become an urgent need.

## Analysis of Core Technical Architecture

1. **Base Model**: Qwen2.5-3B is selected for its multilingual capability (suitable for Vietnamese), high parameter efficiency, and friendly open-source ecosystem; 2. **Efficient Fine-tuning**: QLoRA technology (4-bit quantization + Low-Rank Adaptation + double quantization) is used, allowing fine-tuning of the 3B model on consumer-grade GPUs; 3. **CoT Prompting**: The model is required to generate a structured reasoning process (identify harmful elements → analyze context → extract implicit statements → comprehensive judgment), making decisions transparent and traceable.

## Dataset Construction and Annotation Strategy

Data sources include integration of public social media posts, native speaker crowdsourced annotation, and adversarial sample generation; The annotation dimensions are designed with multiple granularities: hate type (race/religion, etc.), attack intensity, target direction (individual/group/institution), and reasoning basis, providing supervision signals for CoT training.

## Experimental Results and Performance Evaluation

Classification Performance: Accuracy exceeds 90%, F1 score for hate speech is ≥0.85 (better than BERT baseline), AUC-ROC is close to 0.95; Explainability: The consistency between reasoning bases and expert annotations exceeds 80%, auditors have higher trust in results with explanations, and explainable outputs help locate model failure modes (e.g., dialect misjudgment).

## Application Scenarios and Practical Value

1. Social Media Content Moderation: Real-time screening of high-risk content and generation of moderation suggestions; 2. Public Opinion Monitoring: Identifying group conflict risks and providing decision support for governments and enterprises; 3. Academic Tool: Supporting quantitative research on Vietnamese online hate phenomena.

## Limitations and Future Directions

Current Limitations: Limited recognition of Vietnamese dialects/slang, cross-language migration to be explored, high inference latency on edge devices; Future Directions: Build dialect annotation datasets, compress model size using model distillation, introduce multimodal information to handle rich media moderation.

## Project Summary

This project combines large language models, parameter-efficient fine-tuning, and CoT prompting to build an explainable hate speech detection system for low-resource languages. Qwen2.5-3B + QLoRA achieves high performance under limited resources, and CoT improves transparency. This practice has direct value for Vietnamese content safety governance and also provides methodological references for research on other low-resource languages.
