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

AdaptBPE: 从通用到专用的分词器

AdaptBPE: From General Purpose to Specialized Tokenizers

Sorbonne-Université(索邦大学);CNRS(法国国家科学研究中心);ISIR(智能与机器人系统研究所)

Vijini Liyanage, François Yvon

AI总结:

AdaptBPE通过后训练适应策略优化分词器,提升特定领域或任务的分词效率。

摘要:

子词分词方法,如字节对编码(BPE),显著影响大型语言模型(LLMs)的性能和效率。标准方法涉及训练一个通用分词器,统一处理训练和推理过程中所有文本数据。然而,使用通用的标记集在应用于特定领域或语言时可能会导致效率低下。为了解决这一限制,我们提出了一种后训练适应策略,根据适应语料库中令牌的频率,选择性地用更有相关性的令牌替换低效用的令牌。我们的算法识别出最能编码适应语料库的令牌库存,以给定的目标词汇大小。在多个语言上的生成和分类任务中的广泛实验表明,我们的适应分词器在相同词汇大小下比基线方法更有效地压缩测试语料库。该方法是一种轻量级的适应机制,类似于词汇微调过程,使特定领域或任务的分词优化成为可能。我们的代码和数据可在 https://github.com/vijini/Adapt-BPE.git 上获得。

英文摘要:

Subword tokenization methods, such as Byte-Pair Encoding (BPE), significantly impact the performance and efficiency of large language models (LLMs). The standard approach involves training a general-purpose tokenizer that uniformly processes all textual data during both training and inference. However, the use of a generic set of tokens can incur inefficiencies when applying the model to specific domains or languages. To address this limitation, we propose a post-training adaptation strategy that selectively replaces low-utility tokens with more relevant ones based on their frequency in an adaptation corpus. Our algorithm identifies the token inventory that most effectively encodes the adaptation corpus for a given target vocabulary size. Extensive experiments on generation and classification tasks across multiple languages demonstrate that our adapted tokenizers compress test corpora more effectively than baselines using the same vocabulary size. This method serves as a lightweight adaptation mechanism, akin to a vocabulary fine-tuning process, enabling optimized tokenization for specific domains or tasks. Our code and data are available at https://github.com/vijini/Adapt-BPE.git.

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

↑