用QLoRA微调大模型,提升罗马乌尔都语-英语混写文本的仇恨语言检测性能。
Fine-Tuning Large Language Models with QLoRA for Offensive Language Detection in Roman Urdu-English Code-Mixed Text
- 基于QLoRA实现内存高效的模型微调,适配低资源混写文本
- Meta LLaMA 3 8B达91.45的最高F1值,优于传统模型
- 为多语言仇恨内容检测提供可扩展的LLM解决方案
罗马乌尔都语与英语混写的语言中使用贬损性词汇,因语法不明确、拼写不一致及标注数据稀缺,给自然语言处理系统带来挑战。本文提出一种基于QLoRA的微调框架,提升罗马乌尔都语-英语混写文本中的仇恨语言检测效果。我们使用Google Translate将罗马乌尔都语-英语混写数据集翻译为英文,以利用英文大语言模型,尽管此方法降低了对混写特征的直接建模能力。研究重点在于使用英文翻译后的低资源输入进行分类性能优化。我们对多个Transformer和大语言模型(包括Meta LLaMA 3 8B、Mistral 7B v0.1、LLaMA 2 7B、ModernBERT和RoBERTa)采用QLoRA进行微调,以实现内存高效适应。所有模型在人工标注的罗马乌尔都语仇恨/非仇恨内容数据集上进行训练与评估。在所有测试模型中,Meta LLaMA 3 8B取得91.45的最高F1得分,其次为Mistral 7B的89.66,显著优于传统Transformer基线。结果表明,QLoRA在低资源环境下微调高性能模型的有效性,证实了大语言模型在该任务中的潜力。本工作推动了罗马乌尔都语内容审核的可扩展方案,并为未来基于大语言模型的多语言仇恨检测系统奠定基础。
原文摘要 · Abstract (English)
The use of derogatory terms in languages that employ code mixing, such as Roman Urdu, presents challenges for Natural Language Processing systems due to unstated grammar, inconsistent spelling, and a scarcity of labeled data. In this work, we propose a QLoRA based fine tuning framework to improve offensive language detection in Roman Urdu-English text. We translated the Roman Urdu-English code mixed dataset into English using Google Translate to leverage English LLMs, while acknowledging that this translation reduces direct engagement with code mixing features. Our focus is on classification performance using English translated low resource inputs. We fine tuned several transformers and large language models, including Meta LLaMA 3 8B, Mistral 7B v0.1, LLaMA 2 7B, ModernBERT, and RoBERTa, with QLoRA for memory efficient adaptation. Models were trained and evaluated on a manually annotated Roman Urdu dataset for offensive vs non offensive content. Of all tested models, the highest F1 score of 91.45 was attained by Meta LLaMA 3 8B, followed by Mistral 7B at 89.66, surpassing traditional transformer baselines. These results demonstrate the efficacy of QLoRA in fine tuning high performing models for low resource environments such as code mixed offensive language detection, and confirm the potential of LLMs for this task. This work advances a scalable approach to Roman Urdu moderation and paves the way for future multilingual offensive detection systems based on LLMs.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。