arXiv(opens in a new tab)cs.CLOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.01984

Universal Byte-Level Encoding: UTF-8/UTF-16 Routing to Reduce Cross-Script Token-Budget Disparities

Hyunsik Kim, Youngmoon Jung

Abstract

Byte-level byte-pair encoding (BBPE) tokenizers are attractive for large language models (LLMs) in multilingual settings because they cover all Unicode text. In UTF-8-based BBPE, however, many scripts start from a higher byte-level fallback cost than English: when no learned merges can be applied, a multibyte character requires multiple byte-derived symbols. We call this worst-case pre-merge cost the encoding floor. A higher floor can increase token counts, shrink usable context, and increase per-request cost. Changing the underlying text encoding can reduce this gap, but a single global encoding can also make already-efficient English spans more expensive in mixed-script text. We propose Universal Byte-Level Encoding (UBE), a dual-alphabet tokenizer that keeps characters encoded in 1–2 UTF-8 bytes on the UTF-8 path while routing 3–4-byte UTF-8 characters through UTF-16. This lowers the encoding floor for 3-byte Basic Multilingual Plane (BMP) characters in scripts with high token premiums (token counts relative to English) without raising it for already-efficient spans in mixed-script text. UBE changes only the byte representation presented to byte-pair encoding (BPE): the BPE merge rule remains standard, and exact decoding is preserved. UBE also composes with alternative boundary policies and morphology-based representations. In a Unicode 17 audit, UBE exactly round-trips all Unicode scalar values and all inputs in the official normalization, grapheme-break, and emoji test suites. Across intrinsic tokenization evaluations, UBE lowers dispersion in English-normalized token-count ratios, reducing cross-lingual token-budget disparity. In multilingual language model (LM) experiments, UBE matches BBPE's LM quality. In the main multilingual settings, UBE reduces token counts most for high-premium scripts and also slightly lowers English token counts; these reductions translate into more usable context under fixed token budgets and faster prompt processing in content-matched benchmarks.

1 Introduction

Tokenization is often treated as a preprocessing detail, but in multilingual language modeling it also determines how fixed context and compute budgets are spent across languages. When a tokenizer fragments one language into many more units than another, semantically comparable content consumes more of the usable context window and requires processing longer sequences.

For autoregressive transformers, prompt token count determines the sequence length processed during prefill, so cross-lingual differences in tokenized length, which we call token-budget disparity under a fixed tokenizer, directly affect usable context, latency, and prompt-processing cost. This disparity is not merely a side effect of multilingual data imbalance; it is also a property of tokenizer design itself [Petrov et al., 2023, Arnett et al., 2025].

40th Conference on Neural Information Processing Systems (NeurIPS 2026).

We use fairness in an operational sense: under a shared tokenizer, semantically comparable text should not require systematically different token budgets solely because characters from different scripts have different per-character byte-encoding costs. Even when high-resource languages dominate overall usage, this disparity remains operationally consequential because it reduces usable context under fixed token budgets and affects latency and per-request cost for users writing in scripts with higher byte costs. As multilingual large language models (LLMs) are deployed across APIs, embedded applications, and instruction-tuned assistants, the same disparity also becomes a pricing concern in pay-per-token interfaces [Ahia et al., 2023, Artola Velasco et al., 2025].

Petrov et al. [2023] show that, under widely deployed tokenizers such as GPT-4's cl100k_base, parallel Shan text can require up to 15×15\times as many tokens as English; by our calculation, a fixed 128K-token context then holds only as much Shan content as about 8.5K English tokens. The problem is especially acute for compact or on-device language models (LMs), where English-centric compact models often use 32K–50K tokenizers [Allal et al., 2025, Liu et al., 2024]; prior work also suggests that tokenizer quality matters more at smaller model scales [Goldman et al., 2024]. Under a compact 16K vocabulary on FLORES-200 [NLLB Team, 2024], a byte-level byte-pair encoding (BBPE) tokenizer averages 200.188 tokens per parallel sentence for the 12 selected configurations in 3-byte Basic Multilingual Plane (BMP) scripts (Appendix Table D.3) but only 34.863 for English, so the same context window holds only about one-sixth as much parallel content in these scripts after normalizing by English token counts. Tokenizer design therefore becomes especially consequential for compact multilingual LMs serving mixed-script users under fixed context budgets.

BBPE is a useful setting for isolating this issue because it is simple, reversible, and language-agnostic: every Unicode string can be represented using a fixed 256-symbol byte alphabet, and byte-pair encoding (BPE) merges can be learned without language-specific segmentation rules. This simplicity, however, comes with an asymmetry inherited from UTF-8: before any merges are learned, characters from different scripts are represented by byte sequences of different lengths. In BBPE, each character is first decomposed into UTF-8 bytes, and BPE merges then combine frequent adjacent byte-derived symbols into larger tokens. Because a finite multilingual vocabulary cannot cover all subword patterns that arise across languages and text domains, low-coverage spans continue to fall back toward byte-level decomposition. We define the encoding floor for this substrate-imposed fallback as a scalar-level fallback cost: the number of base byte symbols required for one Unicode scalar value under the underlying byte encoding when no learned merge covers it. It is not a lower bound on post-BPE token counts; learned merges can compress frequent characters and multi-character spans below the floor, while underrepresented spans often remain close to it. Under UTF-8, this floor is script- and code-point-dependent (Section 3, Table 1).

The encoding floor is a scalar-level, pre-merge analogue of the corpus-level byte premium [Arnett et al., 2024], which measures UTF-8 byte-length ratios between content-matched texts. Larger vocabularies absorb more frequent patterns, although added tokens become progressively less frequent [Reddy et al., 2025], and token-premium disparities persist across comparably trained monolingual tokenizers even as vocabulary size increases [Arnett et al., 2025]; spans that no learned merge covers still pay the full encoding floor, motivating our aligned token premiums and English-normalized dispersion metrics.

Recent work shows that replacing the byte-encoding substrate can lower this floor for some scripts [Kim et al., 2026]; however, a uniform replacement can also raise costs for spans already efficient under UTF-8 in mixed-script text. In this work, we propose Universal Byte-Level Encoding (UBE), a dual-alphabet BBPE tokenizer with deterministic per-character routing based on UTF-8 byte length. Characters encoded in 1–2 UTF-8 bytes stay on the UTF-8 path, while 3-byte BMP characters are routed through UTF-16, where they require 2 bytes. Because routing is per character rather than per language, UBE lowers the encoding floor for scripts most exposed to byte-level fragmentation without imposing the uniform 2-byte floor on already-efficient spans in mixed-script text. The method leaves BPE training and merge learning unchanged, preserves exact round-trip decoding for encoded text, and requires no language identification or model-architecture changes.

References (1)

  • Pair statistics are derived from the retained word table during finalization