paper-with-me

홈 › Papers

Exact Byte-Level Probabilities from Tokenized Language Models for FIM-Tasks and Model Ensembles

2024-10-11 · Buu Phan, Brandon Amos, Itai Gat, Marton Havasi, Matthew Muckley, Karen Ullrich

Tokenization is associated with many poorly understood shortcomings in language models (LMs), yet remains an important component for long sequence scaling purposes. This work studies how tokenization impacts model performance by analyzing and comparing the stochastic behavior of tokenized models with their byte-level, or token-free, counterparts. We discover that, even when the two models are statistically equivalent, their predictive distributions over the next byte can be substantially different, a phenomenon we term as "tokenization bias''. To fully characterize this phenomenon, we introduce the Byte-Token Representation Lemma, a framework that establishes a mapping between the learned token distribution and its equivalent byte-level distribution. From this result, we develop a next-byte sampling algorithm that eliminates tokenization bias without requiring further training or optimization. In other words, this enables zero-shot conversion of tokenized LMs into statistically equivalent token-free ones. We demonstrate its broad applicability with two use cases: fill-in-the-middle (FIM) tasks and model ensembles. In FIM tasks where input prompts may terminate mid-token, leading to out-of-distribution tokenization, our method mitigates performance degradation and achieves an approximately 18% improvement in FIM coding benchmarks, consistently outperforming the standard token healing fix. For model ensembles where each model employs a distinct vocabulary, our approach enables seamless integration, resulting in improved performance (up to 3.7%) over individual models across various standard baselines in reasoning, knowledge, and coding.

📄 PDF Abstract BibTeX arXiv:2410.09303

Code (0)

등록된 구현이 없습니다.

Tasks

LEMMA

Similar Papers 제목 키워드 기반

Disentangling Language Modeling and Boundaries

2026-08-04 · Mykola Haltiuk arxiv

Byte-level language models are usually argued for on the grounds of robustness, multilingual fairness, and character-level skills. We point to a different, structural advantage: because they read and write bytes, any two…

SpaceByte: Towards Deleting Tokenization from Large Language Modeling

2024-04-22 · Kevin Slagle

Tokenization is widely used in large language models because it significantly improves performance. However, tokenization imposes several disadvantages, such as performance biases, increased adversarial vulnerability, de…

DecoderLanguage ModelingLanguage Modelling

Understanding and Mitigating Tokenization Bias in Language Models

2024-06-24 · Buu Phan, Marton Havasi, Matthew Muckley, Karen Ullrich

State-of-the-art language models are autoregressive and operate on subword units known as tokens. Specifically, one must encode the conditioning string into a list of tokens before passing to the language models for next…

Language ModelingLanguage Modelling

MambaByte: Token-free Selective State Space Model

2024-01-24 · Junxiong Wang, Tushaar Gangavarapu, Jing Nathan Yan, Alexander M. Rush

Token-free language models learn directly from raw bytes and remove the inductive bias of subword tokenization. Operating on bytes, however, results in significantly longer sequences. In this setting, standard autoregres…

Computational EfficiencyInductive BiasLanguage ModelingLanguage Modelling+2

Cross-Tokenizer LLM Distillation through a Byte-Level Interface

2026-04-08 · Avyav Kumar Singh, Yen-Chen Wu, Alexandru Cioba, Alberto Bernacchia 외 arxiv

Cross-tokenizer distillation (CTD), the transfer of knowledge from a teacher to a student language model when the two use different tokenizers, remains a largely unsolved problem. Existing approaches rely on heuristic st…