arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2512.18399cs.CLcs.AI
收藏

AraToken: 通过规范化流程和语言扩展优化阿拉伯语分词以适应Qwen3

AraToken: Optimizing Arabic Tokenization with Normalization Pipeline and Language Extension for Qwen3

Higher School of Economics(俄罗斯高等经济学院);AI Talent Hub, ITMO University(ITMO大学人工智能人才中心);Markov Lab, Saint Petersburg State University(圣彼得堡国立大学马尔科夫实验室)

Mark Kashirskiy, Artiom Lipinski, Ilya Makarov

AI总结:

AraToken通过规范化流程和语言扩展优化阿拉伯语分词,提升Qwen3的阿拉伯语处理性能。

摘要:

分词是大型语言模型(LLMs)的关键预处理步骤,直接影响训练效率和下游性能。通用分词器主要针对英语和拉丁文字语言训练,对形态丰富的语言如阿拉伯语表现不佳,导致分词序列膨胀和压缩效率降低。在本工作中,我们提出了AraToken,一种基于SentencePiece Unigram算法的阿拉伯语优化分词器,配备全面的规范化流程,解决阿拉伯语特有的拼写变异,包括阿利夫变体、附加符号和阿拉伯-印度数字。我们系统地比较了BPE、WordPiece和SentencePiece算法在多种配置下的表现,证明SentencePiece配合规范化可将生育率降低18%(1.199 vs 1.35 tokens/word)相比未规范的基线。此外,我们引入了语言扩展流程(LEP),一种将优化分词器整合到Qwen3-0.6B中的方法,通过词汇扩展与均值子词初始化和选择性变压器层解冻实现。我们的实验表明,LEP在10万阿拉伯语样本上800次训练步骤内,将评估损失从8.28降至2.43。我们发布了分词器、训练脚本和模型检查点,以促进阿拉伯语NLP研究。

英文摘要:

Tokenization is a critical preprocessing step for large language models (LLMs), directly impacting training efficiency and downstream performance. General-purpose tokenizers trained predominantly on English and Latin-script languages exhibit suboptimal performance on morphologically rich languages such as Arabic, resulting in inflated token sequences and reduced compression efficiency. In this work, we present AraToken, an Arabic-optimized tokenizer built on SentencePiece Unigram algorithm with a comprehensive normalization pipeline addressing Arabic-specific orthographic variations including Alif variants, diacritics, and Arabic-Indic numerals. We systematically compare BPE, WordPiece, and SentencePiece algorithms across multiple configurations, demonstrating that SentencePiece with normalization achieves 18% lower fertility (1.199 vs 1.35 tokens/word) compared to unnormalized baselines. Furthermore, we introduce the Language Extension Pipeline (LEP), a method for integrating the optimized tokenizer into Qwen3-0.6B through vocabulary extension with mean subtoken initialization and selective transformer layer unfreezing. Our experiments show that LEP reduces evaluation loss from 8.28 to 2.43 within 800 training steps on 100K Arabic samples. We release our tokenizer, training scripts, and model checkpoints to facilitate Arabic NLP research.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑