mlsanityData to 7 Oct 2026

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

arXiv 2410.09303 ↗First posted 11 Oct 2024cs.CL cs.LGcited by 15

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

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
  3. 2019The Curious Case of Neural Text Degenerationcited by 2,881
  4. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  5. 2024Yi: Open Foundation Models by 01.AIcited by 706
  6. 2023LLM-Blender: Ensembling Large Language Models with Pairwise Ranking and Generative Fusioncited by 550
  7. 2017Six Challenges for Neural Machine Translationcited by 334
  8. 2022Efficient Training of Language Models to Fill in the Middlecited by 248
  9. 2019BPE-Dropout: Simple and Effective Subword Regularizationcited by 189
  10. 2023MEGABYTE: Predicting Million-byte Sequences with Multiscale Transformerscited by 164
  11. 2019On NMT Search Errors and Model Errors: Cat Got Your Tongue?cited by 114
  12. 2024Knowledge Fusion of Large Language Modelscited by 110
9 more
  1. 2024Ensemble Learning for Heterogeneous Large Language Models with Deep Parallel Collaborationcited by 66
  2. 2024Getting the most out of your tokenizer for pre-training and domain adaptationcited by 65
  3. 2024Unpacking Tokenization: Evaluating Text Compression and its Correlation with Model Performancecited by 61
  4. 2023Tokenization and the Noiseless Channelcited by 58
  5. 2024MYTE: Morphology-Driven Byte Encoding for Better and Fairer Multilingual Language Modelingcited by 40
  6. 2024How to Compute the Probability of a Wordcited by 36
  7. 2024Toward a Theory of Tokenization in LLMscited by 28
  8. 2024Token Alignment via Character Matching for Subword Completioncited by 9
  9. 2024CharED: Character-wise Ensemble Decoding for Large Language Modelscited by 3

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 11; 2026: 4.

15 papers.

Sort:

By area: