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

AdaptiVocab:通过轻量级词表适配提升大语言模型在聚焦领域中的效率

AdaptiVocab: Enhancing LLM Efficiency in Focused Domains through Lightweight Vocabulary Adaptation

Technion - IIT(以色列理工学院);Habana Labs(Habana实验室)

Itay Nakash, Nitay Calderon, Eyal Ben David, Elad Hoffer, Roi Reichart

AI总结:

针对大语言模型在特定领域计算开销高的问题,提出轻量级端到端词表适配方法AdaptiVocab,通过替换领域n元词元、指数加权初始化嵌入与单GPU微调,在不损失性能的前提下降低25%以上词元用量。

摘要:

大语言模型(LLM)作为通用模型已展现出出色的通用性。然而,其广泛的适用性伴随着高昂的计算开销,尤其是在自回归解码过程中,每一步都需要一次前向传播。在领域特定场景中,通用能力并非必需,可以为效率而取舍。\n本研究从全新的领域适配视角出发,通过让词表适配感兴趣的聚焦领域,降低延迟与计算成本。我们提出AdaptiVocab,一种端到端的词表适配方法,旨在提升低资源领域下的LLM效率。AdaptiVocab可应用于任意分词器与架构,通过用基于领域n元语法的词元替换原有词元来修改词表,从而减少输入处理与输出生成所需的词元数量。AdaptiVocab使用现有嵌入的指数加权组合初始化新的n词元嵌入,并采用可在单GPU上高效完成的轻量级微调阶段。\n我们在三个小众领域上对两个7B参数的LLM进行评估,衡量效率、生成质量与下游任务性能。结果表明,AdaptiVocab在不损失性能的前提下,将词元使用量降低了25%以上。

英文摘要:

Large Language Models (LLMs) have shown impressive versatility as general purpose models. However, their broad applicability comes at a high-cost computational overhead, particularly in auto-regressive decoding where each step requires a forward pass. In domain-specific settings, general-purpose capabilities are unnecessary and can be exchanged for efficiency. In this work, we take a novel perspective on domain adaptation, reducing latency and computational costs by adapting the vocabulary to focused domains of interest. We introduce AdaptiVocab, an end-to-end approach for vocabulary adaptation, designed to enhance LLM efficiency in low-resource domains. AdaptiVocab can be applied to any tokenizer and architecture, modifying the vocabulary by replacing tokens with domain-specific n-gram-based tokens, thereby reducing the number of tokens required for both input processing and output generation. AdaptiVocab initializes new n-token embeddings using an exponentially weighted combination of existing embeddings and employs a lightweight fine-tuning phase that can be efficiently performed on a single GPU. We evaluate two 7B LLMs across three niche domains, assessing efficiency, generation quality, and end-task performance. Our results show that AdaptiVocab reduces token usage by over 25% without compromising performance

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

↑