arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2403.00417cs.CL
收藏

重新思考分词:为大型语言模型打造更好的分词器

Rethinking Tokenization: Crafting Better Tokenizers for Large Language Models

Max Planck Institute for Psycholinguistics(马克斯·普朗克心理语言学研究所)

Jinbiao Yang

AI总结:

本文针对 BPE 等分词器在非拉丁语言和 MWEs 上的不足,借鉴认知科学“最小努力原则”提出 LiB 分词器,可自主学习子词、词与 MWEs 集成词汇并减少 token 与类型数量,实验表现优于现有方法。

摘要:

分词显著影响语言模型(LMs)的性能。本文追溯了分词器从词级到子词级的演进,分析它们如何在 token 与类型之间取得平衡,以在控制复杂度的同时增强模型适应性。尽管 Byte Pair Encoding(BPE)等子词分词器克服了词级分词器的许多局限,但它们在处理非拉丁语言时遇到困难,并且严重依赖大量训练数据和计算资源,才能掌握多词表达式(MWEs)的细微差别。本文认为,分词器不仅仅是技术工具,还应当从有关人类语言处理的认知科学中汲取灵感。随后,本研究引入认知科学中的“最小努力原则”,即人类自然地寻求减少认知努力,并讨论该原则对分词器开发的益处。基于这一原则,论文提出 Less-is-Better(LiB)模型,它可能成为 LLM 分词器的一种新方法。LiB 模型能够自主学习由子词、词和 MWEs 组成的集成词汇,从而有效减少 token 数量和类型数量。对比评估表明,LiB 分词器优于现有的词级和 BPE 分词器,为分词器开发提供了一种创新方法,并预示未来基于认知科学的分词器可能更加高效。

英文摘要:

Tokenization significantly influences language models(LMs)' performance. This paper traces the evolution of tokenizers from word-level to subword-level, analyzing how they balance tokens and types to enhance model adaptability while controlling complexity. Despite subword tokenizers like Byte Pair Encoding (BPE) overcoming many word tokenizer limitations, they encounter difficulties in handling non-Latin languages and depend heavily on extensive training data and computational resources to grasp the nuances of multiword expressions (MWEs). This article argues that tokenizers, more than mere technical tools, should drawing inspiration from the cognitive science about human language processing. This study then introduces the "Principle of Least Effort" from cognitive science, that humans naturally seek to reduce cognitive effort, and discusses the benefits of this principle for tokenizer development. Based on this principle, the paper proposes that the Less-is-Better (LiB) model could be a new approach for LLM tokenizer. The LiB model can autonomously learn an integrated vocabulary consisting of subwords, words, and MWEs, which effectively reduces both the numbers of tokens and types. Comparative evaluations show that the LiB tokenizer outperforms existing word and BPE tokenizers, presenting an innovative method for tokenizer development, and hinting at the possibility of future cognitive science-based tokenizers being more efficient.

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

↑