Exact Byte-Level Probabilities from Tokenized Language Models for FIM-Tasks and Model Ensembles
Not on the map. Why?
Abstract (arXiv)
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 18% improvement in FIM coding benchmarks, while 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. Code is available at: https://github.com/facebookresearch/Exact-Byte-Level-Probabilities-from-Tokenized-LMs
Key facts. Cited by 15 papers in the map (data through 7 Oct 2026). Builds on 21 of its 27 references that are in the map. First posted on arXiv 11 Oct 2024.
Builds on
21 of 27 references.
References · 21
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2019The Curious Case of Neural Text Degenerationcited by 2,881
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2024Yi: Open Foundation Models by 01.AIcited by 706
- 2023LLM-Blender: Ensembling Large Language Models with Pairwise Ranking and Generative Fusioncited by 550
- 2017Six Challenges for Neural Machine Translationcited by 334
- 2022Efficient Training of Language Models to Fill in the Middlecited by 248
- 2019BPE-Dropout: Simple and Effective Subword Regularizationcited by 189
- 2023MEGABYTE: Predicting Million-byte Sequences with Multiscale Transformerscited by 164
- 2019On NMT Search Errors and Model Errors: Cat Got Your Tongue?cited by 114
- 2024Knowledge Fusion of Large Language Modelscited by 110
9 more
- 2024Ensemble Learning for Heterogeneous Large Language Models with Deep Parallel Collaborationcited by 66
- 2024Getting the most out of your tokenizer for pre-training and domain adaptationcited by 65
- 2024Unpacking Tokenization: Evaluating Text Compression and its Correlation with Model Performancecited by 61
- 2023Tokenization and the Noiseless Channelcited by 58
- 2024MYTE: Morphology-Driven Byte Encoding for Better and Fairer Multilingual Language Modelingcited by 40
- 2024How to Compute the Probability of a Wordcited by 36
- 2024Toward a Theory of Tokenization in LLMscited by 28
- 2024Token Alignment via Character Matching for Subword Completioncited by 9
- 2024CharED: Character-wise Ensemble Decoding for Large Language Modelscited by 3
Built on by
Citing papers per year: 2025: 11; 2026: 4.
15 papers.
Sort:
By area:
- 2025Dynamic Chunking for End-to-End Hierarchical Sequence Modelingcited by 65
- 2025Universal Cross-Tokenizer Distillation via Approximate Likelihood Matchingcited by 40
- 2025Causal Estimation of Tokenisation Biascited by 16
- 2025Broken Tokens? Your Language Model can Secretly Handle Non-Canonical Tokenizationscited by 16
- 2025Bolmo: Byteifying the Next Generation of Language Modelscited by 8
- 2025Sampling from Your Language Model One Byte at a Timecited by 7
- 2026Cross-Tokenizer LLM Distillation through a Byte-Level Interfacecited by 6
- 2025Cross-Tokenizer Likelihood Scoring Algorithms for Language Model Distillationcited by 5
- 2025OmniDraft: A Cross-vocabulary, Online Adaptive Drafter for On-device Speculative Decodingcited by 4
- 2025TokSuite: Measuring the Impact of Tokenizer Choice on Language Model Behaviorcited by 4
- 2026AdaFuse: Adaptive Ensemble Decoding with Test-Time Scaling for LLMscited by 4
- 2025Convergence and Divergence of Language Models under Different Random Seedscited by 3
3 more
- 2026Rethinking LLM Ensembling from the Perspective of Mixture Models1 May 2026
- 2026Cross-Tokenizer LLM Distillation through a Byte-Level Interface8 Apr 2026
- 2026Ensembling Language Models with Sequential Monte Carlo5 Mar 2026
- 2026AdaFuse: Adaptive Ensemble Decoding with Test-Time Scaling for LLMs9 Jan 2026
- 2025TokSuite: Measuring the Impact of Tokenizer Choice on Language Model Behavior23 Dec 2025
- 2025Bolmo: Byteifying the Next Generation of Language Models17 Dec 2025
- 2025Cross-Tokenizer Likelihood Scoring Algorithms for Language Model Distillation16 Dec 2025
- 2025Lossless Vocabulary Reduction for Auto-Regressive Language Models9 Oct 2025
- 2025Convergence and Divergence of Language Models under Different Random Seeds30 Sep 2025
- 2025Dynamic Chunking for End-to-End Hierarchical Sequence Modeling10 Jul 2025
- 2025OmniDraft: A Cross-vocabulary, Online Adaptive Drafter for On-device Speculative Decoding3 Jul 2025
- 2025Broken Tokens? Your Language Model can Secretly Handle Non-Canonical Tokenizations23 Jun 2025
3 more
- 2025Sampling from Your Language Model One Byte at a Time17 Jun 2025
- 2025Causal Estimation of Tokenisation Bias3 Jun 2025
- 2025Universal Cross-Tokenizer Distillation via Approximate Likelihood Matching25 Mar 2025
- 2025Dynamic Chunking for End-to-End Hierarchical Sequence Modelingcited by 65
- 2025Universal Cross-Tokenizer Distillation via Approximate Likelihood Matchingcited by 40
- 2025Causal Estimation of Tokenisation Biascited by 16
- 2025Broken Tokens? Your Language Model can Secretly Handle Non-Canonical Tokenizationscited by 16
- 2025Bolmo: Byteifying the Next Generation of Language Modelscited by 8
- 2025Sampling from Your Language Model One Byte at a Timecited by 7
- 2026Cross-Tokenizer LLM Distillation through a Byte-Level Interfacecited by 6
- 2025Cross-Tokenizer Likelihood Scoring Algorithms for Language Model Distillationcited by 5
- 2025TokSuite: Measuring the Impact of Tokenizer Choice on Language Model Behaviorcited by 4
- 2025Convergence and Divergence of Language Models under Different Random Seedscited by 3
- 2025Lossless Vocabulary Reduction for Auto-Regressive Language Modelscited by 2
- 2026Ensembling Language Models with Sequential Monte Carlocited by 2
- 2026Cross-Tokenizer LLM Distillation through a Byte-Level Interface8 Apr 2026
- 2026Ensembling Language Models with Sequential Monte Carlo5 Mar 2026
- 2025TokSuite: Measuring the Impact of Tokenizer Choice on Language Model Behavior23 Dec 2025
- 2025Bolmo: Byteifying the Next Generation of Language Models17 Dec 2025
- 2025Cross-Tokenizer Likelihood Scoring Algorithms for Language Model Distillation16 Dec 2025
- 2025Lossless Vocabulary Reduction for Auto-Regressive Language Models9 Oct 2025
- 2025Convergence and Divergence of Language Models under Different Random Seeds30 Sep 2025
- 2025Dynamic Chunking for End-to-End Hierarchical Sequence Modeling10 Jul 2025
- 2025Broken Tokens? Your Language Model can Secretly Handle Non-Canonical Tokenizations23 Jun 2025
- 2025Sampling from Your Language Model One Byte at a Time17 Jun 2025
- 2025Causal Estimation of Tokenisation Bias3 Jun 2025
- 2025Universal Cross-Tokenizer Distillation via Approximate Likelihood Matching25 Mar 2025