Efficient multilingual spam detection on resource-constrained devices: a comparative analysis of QLoRA fine-tuning of Gemma 3, Qwen 3, and Llama 3.2 models
摘要
Modern spam is worldwide and multilingual, making advanced detection difficult for resource-constrained devices to balance with user privacy and efficiency. The lack of multilingual training data and the high computing cost of Large Language Models hinder traditional solutions. A secure, privacy-preserving framework for multilingual spam classifier development is presented and tested in this research. First, we synthetically generate a balanced, 21-language dataset by high-fidelity translating the English Enron corpus using the Aya-101 model to handle data scarcity. Next, we use Quantized Low-Rank Adaptation to effectively fine-tune the 4-bit quantized versions of leading compact LLMs Gemma 3-4B, Qwen 3-4B, and Llama 3.2-3B in a thorough comparison. QLoRA-tuned models improve significantly, with the Gemma 3-4B model performing best with 90% accuracy and 0.88 F1-score. A stunning 22-percentage-point increase above its 16-bit baseline. The fine-tuned models also reduced VRAM footprint significantly, proving their on-device feasibility. QLoRA and synthetic data pipelines provide a compelling, practical blueprint for implementing cutting-edge AI in privacy-sensitive, resource-constrained situations, according to this research.