ヒューリスティック適応とスーパートークン学習による言語モデルのトークナイザ柔軟性の実現
Achieving Tokenizer Flexibility in Language Models through Heuristic Adaptation and Supertoken Learning
May 14, 2025
著者: Shaurya Sharthak, Vinayak Pahalwan, Adithya Kamath, Adarsh Shirawalmath
cs.AI
要旨
事前学習済み言語モデル(LLM)は、固定されたトークン化スキームに制約されることが多く、特に多言語や専門的なアプリケーションにおいて非効率性や性能の限界を引き起こします。このトークナイザーの固定化は重大な課題を提示します。これを克服するための標準的な方法は、しばしば膨大な計算リソースを必要とします。ヒューリスティックな初期化によるトークナイザーの置換はこの負担を軽減することを目指していますが、既存の方法では徹底的な残差微調整が必要であり、セマンティックなニュアンスを完全に保持したり、根本的な圧縮の非効率性を適切に解決したりできない場合があります。私たちのフレームワークは、2つの革新を導入します。まず、モデルに依存しないトークナイザー移植方法であるTokenadapt、そして、圧縮を強化し断片化を減少させるためのマルチワードSupertokensのための新しい事前トークン化学習です。Tokenadaptは、新しいユニークなトークン埋め込みを、2つの方法を組み合わせたハイブリッドヒューリスティックで初期化します。1つは古いトークナイザーを使用したサブワード分解に基づく局所的な推定、もう1つは元の語彙からトップkのセマンティックに類似したトークンを利用したグローバルな推定です。この方法論は、セマンティクスを保持しつつ、再学習の要件を大幅に最小化することを目指しています。実証研究は両方の貢献を検証しています。移植ヒューリスティックはユニークなトークンを成功裏に初期化し、TranstokenizerやReTokを含む従来のベースラインや洗練された方法を著しく上回り、私たちのSupertokensは顕著な圧縮効果を達成しました。私たちのゼロショットパープレキシティの結果は、TokenAdaptのハイブリッド初期化が、異なるベースモデルと新しく訓練されたターゲットトークナイザーにおいて、ReTokとTransTokenizerのベースラインと比較して一貫して低いパープレキシティ比を生み出すことを示しています。TokenAdaptは通常、ReTokと比較して全体的なパープレキシティ比を大幅に減少させ、これらの集計スコアにおいて少なくとも2倍の改善をもたらしました。
English
Pretrained language models (LLMs) are often constrained by their fixed
tokenization schemes, leading to inefficiencies and performance limitations,
particularly for multilingual or specialized applications. This tokenizer
lock-in presents significant challenges. standard methods to overcome this
often require prohibitive computational resources. Although tokenizer
replacement with heuristic initialization aims to reduce this burden, existing
methods often require exhaustive residual fine-tuning and still may not fully
preserve semantic nuances or adequately address the underlying compression
inefficiencies. Our framework introduces two innovations: first, Tokenadapt, a
model-agnostic tokenizer transplantation method, and second, novel
pre-tokenization learning for multi-word Supertokens to enhance compression and
reduce fragmentation. Tokenadapt initializes new unique token embeddings via a
hybrid heuristic that combines two methods: a local estimate based on subword
decomposition using the old tokenizer, and a global estimate utilizing the
top-k semantically similar tokens from the original vocabulary. This
methodology aims to preserve semantics while significantly minimizing
retraining requirements. Empirical investigations validate both contributions:
the transplantation heuristic successfully initializes unique tokens, markedly
outperforming conventional baselines and sophisticated methods including
Transtokenizer and ReTok, while our Supertokens achieve notable compression
gains. Our zero-shot perplexity results demonstrate that the TokenAdapt hybrid
initialization consistently yields lower perplexity ratios compared to both
ReTok and TransTokenizer baselines across different base models and newly
trained target tokenizers. TokenAdapt typically reduced the overall perplexity
ratio significantly compared to ReTok, yielding at least a 2-fold improvement
in these aggregate scores.Summary
AI-Generated Summary