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

从字符到词元:基于分层BPE的动态分组

From Characters to Tokens: Dynamic Grouping with Hierarchical BPE

University College London(伦敦大学学院);UiPath

Rares Dolga, Lucas Maystre, Tudor Berariu, David Barber

AI总结:

本文提出一种无需额外模型的动态字符分组方法,利用现有BPE结构并引入第二级压缩,实现高效、灵活且语言无关的表示,性能达到或超过现有补丁策略。

摘要:

子词分词方法如字节对编码(BPE)因其在词汇紧凑性和表示能力之间的平衡而被广泛应用于大型语言模型中。然而,它们在表示稀有词方面效率低下,并且需要大型嵌入矩阵。字符级模型解决了这些问题,但引入了性能瓶颈,尤其是在基于Transformer的架构中。最近的分层模型试图通过将字符分组为补丁来融合两种范式的优点,但现有的补丁策略要么依赖空白,限制了其在某些语言中的适用性,要么需要引入新依赖的辅助模型。在本文中,我们提出了一种动态字符分组方法,该方法利用现有BPE分词的结构,无需额外模型。通过在BPE词元后附加显式的补丁结束标记,并引入第二级BPE压缩阶段来控制补丁粒度,我们的方法提供了高效、灵活且与语言无关的表示。实验结果表明,我们的方法在性能上达到或超过了基于动态熵和基于空白的补丁策略,同时保持了紧凑的词汇量。

英文摘要:

Subword tokenization methods like Byte Pair Encoding (BPE) are widely used in large language models due to their balance of vocabulary compactness and representational power. However, they suffer from inefficiencies in representing rare words and require large embedding matrices. Character-level models address these issues but introduce performance bottlenecks, particularly in Transformer-based architectures. Recent hierarchical models attempt to merge the benefits of both paradigms by grouping characters into patches, but existing patching strategies either rely on whitespace-limiting applicability to certain languages, or require auxiliary models that introduce new dependencies. In this paper, we propose a dynamic character grouping method that leverages the structure of existing BPE tokenization without requiring additional models. By appending explicit end-of-patch markers to BPE tokens and introducing a second-level BPE compression stage to control patch granularity, our method offers efficient, flexible, and language-agnostic representations. Empirical results demonstrate that our approach matches or exceeds the performance of dynamic entropy- and whitespace-based patching strategies, while maintaining a compact vocabulary.

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

↑