印度语言在子词分词中代价高达英语的13倍,影响模型使用效率。
The Tokenizer Tax: Quantifying and Explaining the Cross-Lingual Cost of Subword Tokenization for Indian Languages

- 用FLORES-200数据集对比六种分词器对14种印度语言的分词效果
- 平均分词开销达8.0倍,马拉雅拉姆语高达13.0倍,上下文窗口缩至12%
- 分词失败是主因,多语言分词器可降低73%的差距,适合资源有限语言研究者
大型语言模型通过子词分词器处理文本,而非直接读取字符或单词。由于这些分词器主要基于英语语料训练,导致许多非英语语言面临系统性劣势。本文利用FLORES-200平行语料库,量化了印度语言在六种常用分词器下的分词开销,发现以cl100k_base(GPT-3.5和GPT-4使用)为例,印度语言平均分词开销达英语的8.0倍,马拉雅拉姆语甚至高达13.0倍,等效上下文窗口缩减至英语的12%。我们识别出核心机制:字节对合并失败导致文本碎片化为单字节标记,合并失败率与分词开销高度相关(皮尔逊r=0.89)。该现象并非印地文字的固有特性,而是分词器设计所致。多语言分词器如XLM-R和OpenAI的o200k_base可将平均印度语言分词开销降低73%,表明问题具有可修复性。此外,在固定上下文预算下,印度语文档保留的原始内容显著少于英文文档。最后,分析分词开销与Belebele阅读理解性能的关系发现,相关性主要由语言资源丰富度解释,而非分词行为本身。
原文摘要 · Abstract (English)
Large language models (LLMs) process text through subword tokenizers rather than directly reading characters or words. Because these tokenizers are trained predominantly on English-centric corpora, they introduce a systematic and often overlooked disadvantage for many non-English languages. In this work, we quantify this tokenizer tax for Indian languages using the FLORES-200 parallel corpus, measuring tokenization fertility across six widely used tokenizers and fourteen languages. Under cl100k_base (used by GPT-3.5 and GPT-4), Indian languages experience an average 8.0x tokenization tax relative to English, reaching 13.0x for Malayalam, reducing the effective context window to as little as 12% of that available to English users for equivalent semantic content. We identify the primary mechanism behind this disparity: failed byte-pair merges that leave text fragmented into single-byte tokens, with merge failure strongly correlating with tokenizer tax (Pearson r = 0.89). We further show that this phenomenon is not an inherent property of Indic scripts but a consequence of tokenizer design. Multilingual tokenizers such as XLM-R and OpenAI's o200k_base reduce the average Indic tokenizer tax by 73%, demonstrating that the disparity is largely remediable. Beyond token statistics, we quantify a practical consequence by showing that, under fixed context budgets, Indian-language documents preserve substantially less original content than equivalent English documents. Finally, we examine the relationship between tokenizer fertility and reading comprehension performance on the Belebele benchmark, finding that the apparent correlation is largely explained by language resource availability rather than tokenizer behavior alone.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。