mlsanityData to 14 Oct 2026

UTF-8 Plumbing: Byte-level Tokenizers Unavoidably Enable LLMs to Generate Ill-formed UTF-8

arXiv 2511.05578 ↗First posted 5 Nov 2025cs.CLcited by 3

Not on the map. Why?

Abstract (arXiv)

Subword tokenization segments input text according to a pre-defined vocabulary to feed it into a language model; the language model, in turn, generates a sequence made from this same vocabulary. The members of the vocabulary can be built of code points or bytes. Using code points means that all members of the vocabulary are valid UTF-8 characters. However, it also requires thousands of initial members to achieve acceptable coverage of inputs. Beginning with bytes, on the contrary, avoids out-of-vocabulary errors with only 256 initial members of the vocabulary, but the members of the vocabulary and sequences of them are not guaranteed to be valid UTF-8. Sequences that are not valid UTF-8 break code that assumes its input to be valid UTF-8. Applications of language models must account for the breakage thereby introduced. In this paper, we formalize tokenization using monoid theory and prove that tokenizers whose vocabularies contain tokens that are ill-formed UTF-8 can always produce sequences that are ill-formed UTF-8. We demonstrate formally that attempting to incrementally convert tokens back to a string and interpret the results as UTF-8 gives different results than converting the whole sequence of tokens at once. This formal result predicts real-world bugs: we evaluate mitigations for the problem identified and provide case studies of major foundation models, serving engines, and constrained generation systems.

Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 40 of its 75 references that are in the map. First posted on arXiv 5 Nov 2025.

Builds on

40 of 75 references.

References · 40

  1. 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,944
  2. 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,918
  3. 2018SentencePiece: A simple and language independent subword tokenizer and detokenizer for Neural Text Processingcited by 1,989
  4. 2024Phi-3 Technical Report: A Highly Capable Language Model Locally on Your Phonecited by 1,917
  5. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 885
  6. 2018Subword Regularization: Improving Neural Network Translation Models with Multiple Subword Candidatescited by 639
  7. 2025Phi-4-Mini Technical Report: Compact yet Powerful Multimodal Language Models via Mixture-of-LoRAscited by 521
  8. 2021ByT5: Towards a token-free future with pre-trained byte-to-byte modelscited by 509
  9. 2020TweetEval: Unified Benchmark and Comparative Evaluation for Tweet Classificationcited by 417
  10. 2021PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Modelscited by 411
  11. 2021CANINE: Pre-training an Efficient Tokenization-Free Encoder for Language Representationcited by 232
  12. 2023Language Model Tokenizers Introduce Unfairness Between Languagescited by 214
28 more
  1. 2023Efficient Guided Generation for Large Language Modelscited by 200
  2. 2020Byte Pair Encoding is Suboptimal for Language Model Pretrainingcited by 192
  3. 2023Do All Languages Cost the Same? Tokenization in the Era of Commercial Language Modelscited by 192
  4. 2021Charformer: Fast Character Transformers via Gradient-based Subword Tokenizationcited by 160
  5. 2022Synchromesh: Reliable code generation from pre-trained language modelscited by 156
  6. 2021Between words and characters: A Brief History of Open-Vocabulary Modeling and Tokenization in NLPcited by 132
  7. 2023Tokenizer Choice For LLM Training: Negligible or Crucial?cited by 108
  8. 2024Coercing LLMs to do and reveal (almost) anythingcited by 89
  9. 2024Tokenization Is More Than Compressioncited by 89
  10. 2024SynCode: LLM Generation with Grammar Augmentationcited by 69
  11. 2023Tokenization and the Noiseless Channelcited by 59
  12. 2022Language Modelling with Pixelscited by 55
  13. 2024Automata-based constraints for language model decodingcited by 51
  14. 2021Robust Open-Vocabulary Translation from Visual Text Representationscited by 47
  15. 2024Fishing for Magikarp: Automatically Detecting Under-trained Tokens in Large Language Modelscited by 46
  16. 2024MYTE: Morphology-Driven Byte Encoding for Better and Fairer Multilingual Language Modelingcited by 40
  17. 2025CRANE: Reasoning with constrained LLM generationcited by 38
  18. 2023A Formal Perspective on Byte-Pair Encodingcited by 36
  19. 2024IterGen: Iterative Semantic-aware Structured LLM Generation with Backtrackingcited by 29
  20. 2021Why don't people use character-level machine translation?cited by 27
  21. 2024Tokenization Falling Short: On Subword Robustness in Large Language Modelscited by 20
  22. 2024Two Counterexamples to Tokenization and the Noiseless Channelcited by 13
  23. 2025Adversarial Tokenizationcited by 11
  24. 2024Autoregressive Pre-Training on Pixels and Textscited by 10
  25. 2024Improbable Bigrams Expose Vulnerabilities of Incomplete Tokens in Byte-Level Tokenizerscited by 7
  26. 2024Tokenization as Finite-State Transductioncited by 5
  27. 2024Byte BPE Tokenization as an Inverse string Homomorphismcited by 3
  28. 2024Towards Linguistically-Aware and Language-Independent Tokenization for Large Language Models (LLMs)cited by 2

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 3.

3 papers.