Sampling from Your Language Model One Byte at a Time
Jonathan Hayase, Alisa Liu, Noah Smith, Sewoong Oh
Abstract
Tokenization is used almost universally by modern language models, enabling efficient text representation using multi-byte or multi-character tokens. However, prior work has shown that tokenization can introduce distortion into the model's generations, an issue known as the Prompt Boundary Problem (PBP). For example, users are often advised not to end their prompts with a space because it prevents the model from including the space as part of the next token. While this heuristic is effective in English, the underlying PBP continues to affect code generation and languages such as Chinese, where tokens often do not line up with word and syntactic boundaries. In this work, we present an inference-time method to convert any autoregressive LM with a BPE tokenizer into a character-level or byte-level LM. Our method efficiently solves the PBP and is also able to unify the vocabularies of language models with different tokenizers, allowing one to ensemble LMs with different tokenizers at inference time or transfer the post-training from one model to another using proxy-tuning.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
6 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Proxy Compression for Language Modeling cites Byte Latent Transformer: Patches Scale Better Than Tokens
- Proxy Compression for Language Modeling cites Broken Tokens? Your Language Model can Secretly Handle Non-Canonical Tokenizations
- Proxy Compression for Language Modeling cites Charformer: Fast Character Transformers via Gradient-based Subword Tokenization
- Proxy Compression for Language Modeling cites The Curious Case of Neural Text Degeneration
- Pythia: A Suite for Analyzing Large Language Models Across Training and Scaling cites Language Models are Few-Shot Learners
- Broken Tokens? Your Language Model can Secretly Handle Non-Canonical Tokenizations cites Byte Latent Transformer: Patches Scale Better Than Tokens
- Broken Tokens? Your Language Model can Secretly Handle Non-Canonical Tokenizations cites Charformer: Fast Character Transformers via Gradient-based Subword Tokenization
- Language Models are Few-Shot Learners cites The Curious Case of Neural Text Degeneration
Cited by top-tier papers6
- Broken Tokens? Your Language Model can Secretly Handle Non-Canonical TokenizationsBrian Siyuan Zheng, Alisa Liu, Orevaoghene Ahia, Jonathan Hayase et al.NeurIPS 2025 · 19 citations
- Cross-Tokenizer Likelihood Scoring Algorithms for Language Model DistillationBuu Phan, Ashish Khisti, Karen UllrichICLR 2026 · 5 citations
- Proxy Compression for Language ModelingLin Zheng, Li Xinyu, Qian Liu, Xiachong Feng et al.ICML 2026 · 3 citations
- Transducing Language ModelsVésteinn Snæbjarnarson, Samuel Kiegeland, Tianyu Liu, Reda Boumasmoud et al.ICLR 2026 · 3 citations
- Lossless Vocabulary Reduction for Auto-Regressive Language ModelsDaiki Chijiwa, Taku Hasegawa, Kyosuke Nishida, Shin'ya Yamaguchi et al.ICLR 2026 · 3 citations
Builds on27
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- The Curious Case of Neural Text DegenerationAri Holtzman, Jan Buys, Li Du, Maxwell Forbes et al.ICLR 2020 · 4,112 citations
- Pythia: A Suite for Analyzing Large Language Models Across Training and ScalingStella Biderman, Hailey Schoelkopf, Quentin Gregory Anthony, Herbie Bradley et al.ICML 2023 · 1,822 citations
- Charformer: Fast Character Transformers via Gradient-based Subword TokenizationYi Tay, Vinh Q. Tran, Sebastian Ruder, Jai Prakash Gupta et al.ICLR 2022 · 198 citations
- Byte Latent Transformer: Patches Scale Better Than TokensArtidoro Pagnoni, Ramakanth Pasunuru, Pedro Rodríguez, John Nguyen et al.ACL 2025 · 116 citations
Related papers
- From Language Models over Tokens to Language Models over CharactersTim Vieira, Benjamin LeBrun, Mario Giulianelli, Juan Luis Gastaldi et al.ICML 2025
- FLEXITOKENS: Flexible Tokenization for Evolving Language ModelsAbraham Toluwase Owodunni, Orevaoghene Ahia, Sachin KumarACL Findings 2026
- From Bytes to Ideas: Language Modeling with Autoregressive U-NetsMathurin Videau, Badr Youbi Idrissi, Alessandro Ferreira Leite, Marc Schoenauer et al.NeurIPS 2025 · 14 citations
- Exact Byte-Level Probabilities from Tokenized Language Models for FIM-Tasks and Model EnsemblesBuu Phan, Brandon Amos, Itai Gat, Marton Havasi et al.ICLR 2025
- From Characters to Tokens: Dynamic Grouping with Hierarchical BPERares Dolga, Lucas Maystre, Tudor Berariu, David BarberEMNLP Findings 2025 · 1 citation
