FLEXITOKENS:進化する言語モデルのための柔軟なトークン化
FLEXITOKENS: Flexible Tokenization for Evolving Language Models
July 17, 2025
著者: Abraham Toluase Owodunni, Orevaoghene Ahia, Sachin Kumar
cs.AI
要旨
言語モデル(LM)は、単純なファインチューニングによって新しいデータ分布に適応するのが難しい。これは、サブワードトークナイザーの硬直性によるもので、通常、適応中に変更されることはない。この柔軟性の欠如は、分布外ドメイン、未見の言語、またはスクリプトにおけるトークン化の非効率性を引き起こし、過剰な断片化を招くことが多い。本研究では、トークン化を適応可能にするために、学習可能なトークナイザーを備えたバイトレベルのLMを開発する。我々のモデルは、入力バイトシーケンスの境界を予測し、それを可変長セグメントにエンコードするサブモジュールを含む。既存のトークナイザーフリー手法では、この境界予測器を、訓練コーパス全体で固定の圧縮率を強制する補助損失を用いて訓練するため、新たな種類の硬直性が導入される。我々は、FLEXITOKENSという簡素化された訓練目的を提案し、適応中に大幅な柔軟性を可能にする。多言語ベンチマーク、形態的に多様なタスク、およびドメインにわたる評価を通じて、FLEXITOKENSが一貫してトークンの過剰断片化を減少させ、サブワードおよび他の勾配ベースのトークナイザーと比較して下流タスクの性能で最大10%の改善を達成することを示す。実験のコードとデータは、https://github.com/owos/flexitokens で公開される。
English
Language models (LMs) are challenging to adapt to new data distributions by
simple finetuning. This is due to the rigidity of their subword tokenizers,
which typically remain unchanged during adaptation. This inflexibility often
leads to inefficient tokenization, causing overfragmentation of
out-of-distribution domains, unseen languages, or scripts. In this work, we
develop byte-level LMs with learnable tokenizers to make tokenization adaptive.
Our models include a submodule that learns to predict boundaries between the
input byte sequence, encoding it into variable-length segments. Existing
tokenizer-free methods train this boundary predictor using an auxiliary loss
that enforces a fixed compression rate across the training corpus, introducing
a new kind of rigidity. We propose FLEXITOKENS, a simplified training objective
that enables significantly greater flexibility during adaptation. Evaluating
across multiple multilingual benchmarks, morphologically diverse tasks, and
domains, we demonstrate that FLEXITOKENS consistently reduces token
over-fragmentation and achieves up to 10\% improvements on downstream task
performance compared to subword and other gradient-based tokenizers. Code and
data for our experiments will be released at
https://github.com/owos/flexitokens