Optimizing Large Language Models for Moroccan Dialect Translation: A Comparative Study
摘要
Moroccan Dialect, a widely spoken dialect in Morocco, blends elements from Arabic, Tamazight, French, and Spanish, reflecting the country’s linguistic diversity. Despite its prevalence, Moroccan Dialect remains underrepresented in linguistic resources and translation systems, particularly in comparison to Modern Standard Arabic (MSA), the formal version used in media and education. The lack of resources often leads to inaccurate or excessively formal outputs from existing systems. Given this problematic situation, we propose an approach to leverage existing models by fine-tuning large language models (LLMs) for Moroccan Dialect to Modern Standard Arabic (MSA) translation, focusing on enhancing translation accuracy through the creation of a parallel corpus. Seven LLMs were carefully selected and fine-tuned on this corpus using optimized hyperparameters and evaluated through both automatic metrics and human evaluation. Results indicated that the fine-tuned GPT-4o model outperformed others, achieving a SacreBLEU score of 63.97. These findings offer valuable insights for improving translation in Moroccan Dialect and underscore the effectiveness of fine-tuning models for better language understanding and accuracy.