arXiv:2510.21909cs.CL2025-10NeurIPS被引 6

跨语言分词不均导致成本上升,研究发现调整词汇量和预处理可显著缓解。

Explaining and Mitigating Crosslingual Tokenizer Inequities

  • 训练7000个单语分词器,分析97种语言的分词差异。
  • 词汇量与预处理方式影响分词开销,但数据相似性无显著作用。
  • 优化词汇量或使用跨空格合并分词,可大幅降低跨语言成本。

不同语言在并行文本编码中所需的分词数量存在差异,这种现象称为分词溢价。高分词溢价会降低训练吞吐量并增加推理成本。本文发现,即使控制了数据集大小、词汇量和内容后,单语分词器在不同语言间仍存在显著的分词溢价差异。为此,我们为97种语言训练了约7000个可比的单语分词器,系统地调整分词算法、词汇量和数据集大小。通过测量分词溢价,验证了训练与测试数据相似性、词汇量及预处理对分词溢价的影响。结果表明,训练-测试数据相似性不影响分词溢价,但词汇量和预处理方式有显著影响。单纯扩大词汇量无法减少分词溢价,但可确定每种语言的‘最优’词汇量以显著降低溢价。此外,我们还训练了支持跨空格合并的超词分词器(superword tokenizers),发现其既能减少分词溢价,又能提升整体压缩效果。因此,调整词汇量或预处理策略能有效缓解跨语言分词溢价问题。

原文摘要 · Abstract (English)

The number of tokens it takes to encode parallel text in different languages is known to vary. These disparities are called token premiums. Having high token premiums leads to less throughput during training and increases costs at inference. In this paper, we show that even after controlling for dataset size, vocabulary size, and data content, monolingual tokenizers exhibit a wide range of token premiums across languages. To understand the cross-linguistic differences that cause these token premiums, we train a suite of approximately 7,000 comparable monolingual tokenizers for 97 languages, manipulating tokenization algorithm, vocabulary size, and dataset size. We measure token premiums and test for a relationship between factors such as data similarity (between tokenizer training and evaluation), vocabulary size, and pre-tokenization. We also investigate the role of language-specific features such as writing system and word length. We find that similarity between training and test data does not impact token premiums, but vocabulary size and pre-tokenization do. While simply increasing vocabulary size does not lead to reduced token premium effects, we can determine an ``optimal'' vocabulary size for each language to achieve significantly reduced token premium effects. We also train superword tokenizers which allow merges over whitespaces, and we find that they both reduce token premium effects and improve compression overall. Thus, intervening on the vocabulary size or the pre-tokenizer significantly reduces crosslingual token premium effects.

分词器多语言效率优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。