用向量运算精简大模型词汇表,省出10%-40%空间提升多语言覆盖。
Vocab Diet: Reshaping the Vocabulary of LLMs via Vector Arithmetic
- 用基础词+变换向量组合生成变体词,替代独立词条
- 在5种语言上释放10%-40%词汇槽位,不影响下游性能
- 轻量改造适配现有模型,适合多语言部署场景
大语言模型常将词形变化(如walk与walked)表示为嵌入空间中的线性方向。但标准分词器将这些变体视为不同词条,导致词表快速被表面形式填满(如walk、walking、Walk),损害多样性与多语言覆盖。本文发现,多数变体可通过变换向量实现:在基元嵌入上叠加偏移,即可得到正确表示,适用于输入与输出空间。基于此,提出一种紧凑词汇重塑方法:不为每个表面形式分配独立令牌,而是通过共享基元与变换向量组合生成(如walked = walk + past tense)。该方法轻量,仅训练小型适配模块,冻结预训练主干。在五种语言及多个LLM中验证,涵盖预训练与后处理适应,成功释放10%-40%词汇槽位,可重新分配至分词效率低的区域。同时扩展了对未登录词的覆盖,且对下游任务表现影响极小。研究呼吁重新思考词汇设计,使其更贴合语言结构与多语言需求。
原文摘要 · Abstract (English)
Large language models (LLMs) often encode word-form variation (e.g., walk vs. walked) as linear directions in the embedding space. However, standard tokenization algorithms treat such variants as distinct words with different vocabulary entries, quickly filling the size-capped token vocabulary with surface-form variation (e.g., walk, walking, Walk) at the expense of diversity and multilingual coverage. We show that many of these variations can be captured by transformation vectors: additive offsets that yield the appropriate word representation when applied to a base form embedding, in both the input and output spaces. Building on this, we propose a compact reshaping of the vocabulary: instead of assigning unique tokens to each surface form, we compose them from shared base form and transformation vectors (e.g., walked is walk+past tense). Our approach is lightweight, keeping the pretrained backbone frozen and only training small adaptation modules. We apply it across five languages and multiple LLMs in both pretraining and post-hoc adaptation, freeing 10-40% of vocabulary slots to be reallocated where tokenization is inefficient. Importantly, we do so while also expanding vocabulary coverage to out-of-vocabulary words, and with minimal impact on downstream performance. Our findings motivate a rethinking of vocabulary design, towards a representation that better matches the underlying structure of language and the practical needs of multilingual coverage.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。