arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2510.21909cs.CL
收藏

解释与缓解跨语言分词器的不平等现象

Explaining and Mitigating Crosslingual Tokenizer Inequities

EleutherAI;UC San Diego(加州大学圣地亚哥分校)

Catherine Arnett, Tyler A. Chang, Stella Biderman, Benjamin K. Bergen

AI总结:

本研究通过训练约7000个单语分词器,发现词汇表大小和预分词显著影响跨语言token溢价,并可通过确定最优词汇表大小或使用超词分词器来缓解该不平等现象。

摘要:

已知不同语言在编码平行文本时所需的token数量存在差异,这些差异被称为token溢价。高token溢价会导致训练期间吞吐量降低,并增加推理成本。在本文中,我们表明,即使在控制数据集大小、词汇表大小和数据内容之后,单语分词器在不同语言间仍表现出广泛的token溢价范围。为了理解导致这些token溢价的跨语言差异,我们为97种语言训练了约7,000个可比较的单语分词器,并操纵分词算法、词汇表大小和数据集大小。我们测量token溢价,并检验数据相似性(分词器训练与评估之间)、词汇表大小和预分词等因素之间的关系。我们还研究了书写系统和词长等语言特定特征的作用。我们发现,训练与测试数据之间的相似性不影响token溢价,但词汇表大小和预分词确实有影响。虽然简单地增加词汇表大小并不会导致token溢价效应减少,但我们可以为每种语言确定一个“最优”词汇表大小,以显著减少token溢价效应。我们还训练了允许跨空格合并的超词分词器,并发现它们既减少了token溢价效应,又整体上改善了压缩率。因此,对词汇表大小或预分词器进行干预可显著减少跨语言token溢价效应。

英文摘要:

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.

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

↑