AdaptiVocab:軽量な語彙適応による特定領域における大規模言語モデルの効率化
AdaptiVocab: Enhancing LLM Efficiency in Focused Domains through Lightweight Vocabulary Adaptation
March 25, 2025
著者: Itay Nakash, Nitay Calderon, Eyal Ben David, Elad Hoffer, Roi Reichart
cs.AI
要旨
大規模言語モデル(LLM)は、汎用モデルとして非常に優れた汎用性を示しています。しかし、その広範な適用性は高い計算コストを伴い、特に自己回帰的なデコーディングにおいて、各ステップでフォワードパスが必要となる点が顕著です。特定のドメイン設定では、汎用的な能力は不要であり、効率性と交換することが可能です。本研究では、ドメイン適応に新たな視点を取り入れ、関心のある特定のドメインに語彙を適応させることで、レイテンシと計算コストを削減します。私たちは、低リソースドメインにおけるLLMの効率を向上させるために設計された、語彙適応のエンドツーエンドアプローチであるAdaptiVocabを紹介します。AdaptiVocabは、任意のトークナイザーとアーキテクチャに適用可能で、ドメイン固有のn-gramベースのトークンで既存のトークンを置き換えることで、入力処理と出力生成に必要なトークン数を削減します。AdaptiVocabは、既存の埋め込みの指数加重平均を使用して新しいn-トークンの埋め込みを初期化し、単一のGPUで効率的に実行可能な軽量なファインチューニングフェーズを採用します。私たちは、3つのニッチドメインにおいて2つの7B LLMを評価し、効率性、生成品質、およびエンドタスクのパフォーマンスを測定しました。その結果、AdaptiVocabはパフォーマンスを損なうことなく、トークン使用量を25%以上削減することが示されました。
English
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 performanceSummary
AI-Generated Summary