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

语言模型去碎片化:一种基于可解释性的词汇扩展方法

Defragmenting Language Models: An Interpretability-based Approach for Vocabulary Expansion

Kahlert School of Computing, University of Utah(犹他大学计算机学院Kahlert分校);Language Technologies Institute, Carnegie Mellon University(卡内基梅隆大学语言技术研究所)

Maitrey Mehta, Nishant Subramani, Zhichao Xu, Ashim Gupta, Vivek Srikumar

AI总结:

本文提出基于可解释性的词汇扩展方法,解决语言模型中词汇碎片化问题,通过改进词汇选择和嵌入初始化提升效率,提出FragMend方法验证有效性。

摘要:

所有语言都是平等的;在分词方面,有些语言比其他语言更平等。标记是隐藏的货币,决定了访问现代大语言模型(LLMs)的成本和延迟。然而,许多非拉丁文字写的语言观察到较差的汇率:LLMs在许多语言中编码相同信息需要多个标记,而英语则不同。我们的分析揭示了这一问题,称为'标记过度碎片化',在现代开源权重LLMs中仍然存在。标准的解决方法是词汇扩展,即添加缺失的目标语言项。在本文中,我们全面研究并推进基于可解释性的词汇扩展,一种新的研究方向。我们专注于词汇扩展过程中的两个核心决策:应该添加哪些项目?以及如何初始化对应的输入和输出嵌入?首先,我们质疑传统基于频率的方法选择候选词汇项(这一决定长期以来被视为固定),并证明基于可解释性的方法在性能-标记效率权衡上表现更优。其次,我们通过展示在几种非拉丁文字语言中,基于可解释性的嵌入初始化方法比基线初始化方法获得显著提升(约20分),加强了这一方法的案例。我们识别出'子词反标记化'现象,即模型在各层中逐步将碎片化的子词标记合并为更大的子词。基于我们对这一现象的分析,我们提出FragMend,以进一步推动基于可解释性的扩展效率上限。我们通过与强基线的比较验证了FragMend的有效性,并展示了其设计选择的广泛分析。

英文摘要:

All languages are equal; when it comes to tokenization, some are more equal than others. Tokens are the hidden currency that dictates the cost and latency of contemporary LLM access. However, many languages written in non-Latin scripts observe a poor exchange rate: LLMs take several multiples of tokens to encode the same information in many languages as they do for English. We observe that this issue, known as token overfragmentation, persists in modern open-weight LLMs. The standard remedy is vocabulary expansion that adds target language items missing from the model's vocabulary. We focus on two core decisions in the vocabulary expansion process: What items should we add? and How should we initialize their corresponding input and output embeddings? We comprehensively study and advance the new research direction of interpretability-based vocabulary expansion along these two core decisions, making four key contributions: First, we question the conventional use of frequency-based methods to choose candidate vocabulary items to add (a decision long treated as settled), and show that interpretability-based methods offer a superior performance-token efficiency tradeoff. Second, we strengthen the case for interpretability-based embedding initialization by showing large gains (~20 pts) over baseline initialization methods for several languages written in non-Latin scripts. Third, we identify the phenomenon of "subword detokenization," where models progressively merge fragmented subword tokens into larger subwords across layers. Fourth, we propose FragMend, a method that leverages this phenomenon to push the efficiency ceiling of interpretability-based expansion, and validate its effectiveness.

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

↑