Lossless Vocabulary Reduction for Auto-Regressive Language Models
Daiki Chijiwa, Taku Hasegawa, Kyosuke Nishida, Shin'ya Yamaguchi, Tomoya Ohba, Tamao Sakao, Susumu Takeuchi
TL;DR
This work addresses the challenge of cooperative inference across auto regressive language models trained with different vocabularies. It introduces a formal lossless vocabulary reduction framework that maps next token distributions from a full vocabulary to any sub vocabulary through nested tokenization while preserving the underlying text distribution. A key contribution is the relative covering based computation and efficient algorithms that enable practical inference time reductions. As an application, the maximal common vocabulary enables ensemble across models with different tokenizers, achieving comparable accuracy to byte level ensembles with improved efficiency. Empirical results demonstrate near lossless reductions and effective cross model cooperation, highlighting practical benefits for multi tokenizer ecosystems.
Abstract
Tokenization -- the process of decomposing a given text into a sequence of subwords called tokens -- is one of the key components in the development of language models. Particularly, auto-regressive language models generate texts token by token, i.e., by predicting the next-token distribution given the previous ones, and thus tokenization directly affects their efficiency in text generation. Since each language model has their own vocabulary as a set of possible tokens, they struggle to cooperate with each other at the level of next-token distributions such as model ensemble. In this paper, we establish a theoretical framework of lossless vocabulary reduction, which efficiently converts a given auto-regressive language model into the one with an arbitrarily small vocabulary without any loss in accuracy. As an application, we demonstrate that language models with different tokenization can cooperate with each other efficiently through their maximal common vocabulary.
