研究分词器对语言差异的敏感性,发现不同任务需不同分词策略。
Tokenization is Sensitive to Language Variation
- 用Byte-Pair Encoding训练BERT分词器,测试语料、预分词和词表大小影响。
- 预分词对性能影响最大,不同任务类型需不同最优分词器。
- 提出新评估方法,优于传统效率指标,适合研究分词器影响。
语言差异普遍存在,常与地区、社会和语境因素相关。分词器将文本拆分为更小单元,对不常见语言形式可能表现不同,从而影响下游大模型在两类任务上的表现:一类是要求对语言变化具有鲁棒性的任务(如自然语言推理,标签不依赖英美拼写);另一类是要求对语言变化敏感的任务(如作者身份验证,标签依赖英美拼写)。我们使用流行的字节对编码(Byte-Pair Encoding)算法,对BERT base模型进行预训练,探究关键分词设计选择的影响:用于训练分词器的语料、预分词器及词表大小。结果表明,最佳分词器在两类任务中表现不同,其中预分词器对整体性能影响最大。此外,我们提出一种新方法来估计分词器对下游大模型性能的影响,其表现显著优于瑞尼效率等传统度量。我们呼吁更多研究关注语言差异与分词器及其对大模型性能的关系。
原文摘要 · Abstract (English)
Variation in language is ubiquitous and often systematically linked to regional, social, and contextual factors. Tokenizers split texts into smaller units and might behave differently for less common linguistic forms. This might affect downstream LLM performance differently on two types of tasks: Tasks where the model should be robust to language variation (e.g., for semantic tasks like NLI, labels do not depend on whether a text uses British or American spelling) and tasks where the model should be sensitive to language variation (e.g., for form-based tasks like authorship verification, labels depend on whether a text uses British or American spelling). We pre-train BERT base models with the popular Byte-Pair Encoding algorithm to investigate how key tokenization design choices impact the performance of downstream models: the corpus used to train the tokenizer, the pre-tokenizer and the vocabulary size. We find that the best tokenizer varies on the two task types and that the pre-tokenizer has the biggest overall impact on performance. Further, we introduce a new approach to estimate tokenizer impact on downstream LLM performance, showing substantial improvement over metrics like Rényi efficiency. We encourage more work on language variation and its relation to tokenizers and thus LLM performance.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。