Language Models over Canonical Byte-Pair Encodings
Not on the map. Why?
Abstract (arXiv)
Modern language models represent probability distributions over character strings as distributions over (shorter) token strings derived via a deterministic tokenizer, such as byte-pair encoding. While this approach is highly effective at scaling up language models to large corpora, its current incarnations have a concerning property: the model assigns nonzero probability mass to an exponential number of itnoncanonical token encodings of each character string -- these are token strings that decode to valid character strings but are impossible under the deterministic tokenizer (i.e., they will never be seen in any training corpus, no matter how large). This misallocation is both erroneous, as noncanonical strings never appear in training data, and wasteful, diverting probability mass away from plausible outputs. These are avoidable mistakes! In this work, we propose methods to enforce canonicality in token-level language models, ensuring that only canonical token strings are assigned positive probability. We present two approaches: (1) canonicality by conditioning, leveraging test-time inference strategies without additional training, and (2) canonicality by construction, a model parameterization that guarantees canonical outputs but requires training. We demonstrate that fixing canonicality mistakes improves the likelihood of held-out data for several models and corpora.
Key facts. Cited by 8 papers in the map (data through 14 Oct 2026). First posted on arXiv 9 Jun 2025.
Builds on
0 of 0 references.
No references here yet.
Built on by
Citing papers per year: 2025: 6; 2026: 2.
8 papers.
- 2025Sampling from Your Language Model One Byte at a Timecited by 7
- 2025Cross-Tokenizer Likelihood Scoring Algorithms for Language Model Distillationcited by 5
- 2026Transducing Language Modelscited by 5
- 2025When to Ensemble: Identifying Token-Level Points for Stable and Fast LLM Ensemblingcited by 3
- 2026Ensembling Language Models with Sequential Monte Carlocited by 3
- 2025Train It and Forget It: Merge Lists are Unnecessary for BPE Inference in Language Modelscited by 1
- 2025How Persuasive is Your Context?cited by 1
- 2025Decoding-Free Sampling Strategies for LLM Marginalizationcited by 1
- 2026Ensembling Language Models with Sequential Monte Carlo5 Mar 2026
- 2026Transducing Language Models5 Mar 2026
- 2025Cross-Tokenizer Likelihood Scoring Algorithms for Language Model Distillation16 Dec 2025
- 2025Decoding-Free Sampling Strategies for LLM Marginalization23 Oct 2025
- 2025When to Ensemble: Identifying Token-Level Points for Stable and Fast LLM Ensembling17 Oct 2025
- 2025How Persuasive is Your Context?22 Sep 2025
- 2025Train It and Forget It: Merge Lists are Unnecessary for BPE Inference in Language Models8 Aug 2025
- 2025Sampling from Your Language Model One Byte at a Time17 Jun 2025