提出评估分词器的系统框架,揭示其设计影响模型能力
TokEval: A Tokenizer Evaluation Suite
- 构建涵盖语言与结构特性的分词器评估指标体系
- 信息论指标可预测语言建模能力(斯皮尔曼相关0.80)
- 适合关注分词器设计的模型开发者与研究者
语言模型分词器的选择通常缺乏充分评估,而其设计直接影响模型性能。这在一定程度上源于对分词器属性如何影响下游表现的理解有限。本文提出TokEval,一个超越传统指标(如词元密度和压缩率)的分词器评估框架,引入语义与结构相关的度量,例如UTF-8字符边界完整性及数学中数字位值边界对齐性。为验证这些指标是否可预测下游性能,我们进行了受控的预训练实验,仅改变分词器的训练数据混合、预分词策略和训练算法。评估指标包括比特每字节(不依赖分词器的困惑度变体)以及覆盖语言理解、数学推理和代码生成的多个基准。实验表明,不同内在属性对模型能力的影响各异:信息论指标能有效预测语言建模能力(斯皮尔曼等级相关系数最高达0.80),而关注数字与换行处理的结构敏感指标则与任务准确率显著相关。我们期望TokEval能推动更严谨的分词器评估,当与预训练实验结果一致时,可替代耗时的预训练搜索。
原文摘要 · Abstract (English)
Language model tokenizers are typically selected with minimal evaluation, despite the fact that their design choices directly impact model capabilities. This can be partly attributed to a limited understanding of which tokenizer properties affect which aspects of downstream performance. We introduce TokEval, a framework of tokenizer evaluation metrics that goes beyond standard measures like fertility and compression rate to capture linguistically and structurally meaningful properties, e.g., UTF-8 character boundary integrity and digit place-value boundary alignment for mathematics. To validate whether these metrics are predictive of downstream model performance, we conduct controlled language model pretraining experiments, varying solely the tokenizers' training data mixture, pretokenization strategy, and training algorithm. We evaluate the resulting models on bits-per-byte (a tokenizer-agnostic version of perplexity) and several benchmarks, spanning linguistic understanding, mathematical reasoning, and code generation. Our experiments suggest that different intrinsic properties have different impacts on model abilities: information-theoretic metrics predict language modeling abilities (Spearman rho up to 0.80), while structure-sensitive metrics, such as those measuring digit and line-break handling, correlate with task accuracy. We hope TokEval enables more principled tokenizer evaluation, replacing pretraining sweeps with intrinsic measurement wherever the two agree.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。