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

Mark Kashirskiy, Artiom Lipinski, Ilya MakarovarXiv 2025 · DOI

Abstract

AraToken introduces a specialized Arabic tokenization strategy and a Language Extension Pipeline (LEP) designed to enhance the efficiency of Large Language Models (LLMs) for Arabic text. By employing a SentencePiece Unigram model coupled with a custom normalization pipeline, the approach reduces token fertility by 18% and decreases evaluation loss on the Qwen3-0.6B model by 71% within just 800 training steps.

Introduction

Most contemporary LLMs are predominantly trained on English and Latin-script data. When applied to morphologically rich languages like Arabic, standard tokenizers often exhibit high "fertility"—the tendency to fragment single words into numerous sub-tokens. This fragmentation leads to increased computational costs, reduced effective context windows, and degraded model performance. AraToken addresses these challenges through a tailored tokenization and model adaptation framework.

Methodology

The AraToken Pipeline

AraToken moves away from standard Byte Pair Encoding (BPE) in favor of the SentencePiece Unigram algorithm. Unigram's probabilistic approach to sequence segmentation is better suited for Arabic's complex word structures compared to BPE's greedy merging.

A critical component of AraToken is its Normalization Pipeline, which standardizes orthographic variability:

  • Alif Unification: Standardizing variants of the letter Alif.
  • Numeral Conversion: Mapping Arabic-Indic numerals to Western digits.
  • Tatweel Removal: Eliminating stretching characters used for text justification.
  • Diacritic Management: Configurable handling of vowels/diacritics.

Language Extension Pipeline (LEP)

To integrate AraToken into the Qwen3-0.6B model, the authors developed the LEP, which involves vocabulary extension and a "warm start" through Mean Subtoken Initialization. This process averages the embeddings of original subtokens to initialize new Arabic-specific token embeddings. During adaptation, most model parameters are frozen, with training focused on the final four transformer layers to preserve existing knowledge.

Overview of the AraToken and Language Extension Pipeline (LEP).

Experimental Setup

The tokenizer was trained on a corpus of approximately 120 million tokens, comprising 1.1 million Arabic Wikipedia articles and the curated ArabicText-Large dataset. Model adaptation via LEP utilized a subset of 100,000 training samples and 2,000 validation samples.

Results and Analysis

Tokenization Efficiency

AraToken significantly outperformed baseline methods. It achieved a fertility rate of 1.199 tokens per word, representing an 18% improvement over unnormalized baselines. Furthermore, the compression ratio reached 5.03 characters per token, facilitating more efficient processing of long-form text.

Comparison of fertility rates across different tokenization algorithms with and without normalization.

The "Alif" Trade-off

Interestingly, while normalizing all Alif variants into a single character improves tokenization efficiency (lower fertility), the authors observed that preserving these variants (the "Alif4" configuration) resulted in lower language modeling loss. This suggests that orthographic distinctions in Arabic carry significant semantic information that aids model understanding.

Model Performance and Pruning

The LEP method demonstrated extreme efficiency in model adaptation. Evaluation loss for the Qwen3-0.6B model dropped from 8.28 to 2.43 in only 800 training steps. Additionally, analysis of vocabulary size indicated that pruning to 99% coverage (76K tokens) maintains performance while optimizing the model's memory footprint.

Conclusion

AraToken and the LEP framework provide a robust path for adapting LLMs to Arabic. While current results are focused on intrinsic metrics and smaller model scales, the significant gains in fertility and loss reduction suggest high potential for larger-scale deployments. Future work will extend these methods to regional dialects and broader benchmarks like ALUE and ArabicGLUE.

Summary updated

BibTeX
@misc{kashirskiy2025aratoken,
  author = {Mark Kashirskiy and Artiom Lipinski and Ilya Makarov},
  title = {{AraToken: Optimizing Arabic Tokenization with Normalization Pipeline and Language Extension for Qwen3}},
  year = {2025},
  eprint = {2512.18399},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.18399},
}
Figure