Manuscript Offprint

arXiv:2610.22071

The Right Byte First: How UTF-16 Helps Multilingual Boundary Prediction

Hyunsik Kim

Abstract

Many hierarchical byte-level language models group bytes into patches using a learned boundary predictor whose view of the next codepoint depends on encoding and lookahead. In UTF-8, codepoints of many scripts take three bytes: 8 of 24 bits mark length and continuation, and the first byte carries only 4 high codepoint bits. After the same left context, a mark extending a grapheme cluster and a letter starting the next can thus share their first byte. Universal Byte-Level Encoding (UBE) keeps one- and two-byte UTF-8 encodings but writes these codepoints as two UTF-16 bytes, low byte first, so its first symbol carries 8 low codepoint bits that can distinguish such continuations. We train small causal predictors on matched FineWeb-2 text and evaluate on FLORES-200 under UTF-8, UBE, and UBE's same-length big-endian variant. At one-symbol lookahead, balanced grapheme-boundary error at codepoint boundaries across 17 languages in 13 Brahmic scripts is 8.76% with UTF-8, 8.62% with the big-endian variant, and 0.06% with UBE. When the target instead retains a parent tokenizer's subword cuts at grapheme boundaries, UBE lowers the mean error relative to UTF-8 at the same lookahead by 72.91% in Korean, 35.29% in Chinese, and 67.32–99.55% in eight more scripts. In the seven of them whose main Unicode block fits on one 256-codepoint page, the big-endian variant stays within 3.0% of UTF-8, so the gain follows byte order, not length. In Korean and Chinese, UBE's mean error falls below UTF-8's final mean error after only 25% and 37.5% of training. Which byte comes first thus affects how much lookahead a byte-level boundary predictor needs.

1. Introduction

In hierarchical byte-level language models with learned patching, a boundary predictor groups the input into patches for the global transformer. The character distinctions needed to predict these units depend on the writing system and the segmentation target. Consider a grapheme cluster, Unicode's approximation to a written character, which may combine a base with dependent marks. After identical left context, one-byte lookahead at a codepoint boundary in UTF-8 can reveal the same byte for a mark extending the current cluster and a letter starting the next. The required decisions then remain indistinguishable even when the target segmentation is unambiguous. Byte-level models can process text in any language out of the box (Xue et al., 2022); at limited lookahead, however, the encoding does not expose every script's distinctions equally. When clusters consist of single codepoints, the task changes: a subword boundary predictor must select which inter-character boundaries to retain. These tasks require different distinctions, motivating us to study encoding choice in relation to both the script and the boundary target.

The encoding affects both how densely codepoint bits are packed and which bits reach the predictor first. For a Unicode scalar (a codepoint other than a surrogate) that takes three UTF-8 bytes, the pattern 1110xxxx10xxxxxx 10xxxxxx carries 16 codepoint bits and 8 length/continuation bits (The Unicode Consortium, 2025). The same scalar occupies 16 bits in UTF-16 without those markers, so UTF-8 is inherently less compact for such scalars. We use the existing Universal Byte-Level Encoding (UBE; Kim & Jung, 2026), which retains one- and two-byte UTF-8 encodings and uses UTF-16 little-endian (UTF-16LE) for longer ones. For three-byte UTF-8 scalars, UBE therefore shortens the representation to two symbols and presents 8 low codepoint bits in the first symbol, where UTF-8 presents only 4 high bits. Within a known 256-codepoint page, that byte identifies the codepoint. When a letter and a dependent mark occupy different positions on that page, UBE therefore exposes the distinction needed to start or extend a cluster in its first symbol, even if their

Preprint. October 16, 2026.

UTF-8

UBE-BE (UBE's length, big-endian)

UBE • Seeds

(a) Every cluster boundary, 17 languages

(b) Retained parent cuts, Korean

Figure

Lookahead

(c) Retained parent cuts, Chinese

Lookahead

Lookahead

Figure 1. Boundary errors at one-symbol lookahead (k = 1) and with the whole next scalar visible (k = 3 for UTF-8; k = 2 for UBE and UBE-BE). (a) Every-cluster target on the 17-language FLORES-200 panel: balanced error at scalar ends, the mean of the missed-boundary and false-cut rates; within-scalar cuts are reported separately (Section 4). (b, c) Retained parent-tokenizer cuts in Korean and Chinese, where every evaluated cluster is one scalar: errors per 1,000 scalars, including within-scalar false cuts. Bars are means over 2 seeds in (a) and 3 in (b, c); dots show seeds.

UTF-8 prefixes coincide. Codepoints on different pages can still share a low byte. Figure 1 previews the boundary errors of small predictors trained on each encoding; Figure 2 shows why the first byte can hide or expose the required distinction. The worked example in Appendix C illustrates the cluster fragmentation that motivates our targets.

Our motivating application is byteification, the conversion of a pretrained subword language model into a model that reads and emits bytes. Bolmo surrounds the parent transformer with local modules and trains a boundary predictor on the parent's subword segmentation; the global transformer then operates on the resulting patches (Minixhofer et al., 2025; 2026). Byteification thus removes the tokenizer from the model's interface but transfers its segmentation criterion along with the weights: the patches are still learned from the parent's cuts (Section 5.2). Bolmo raises the question of what models inherit from the input encoding and suggests alternatives to UTF-8 (Minixhofer et al., 2025, Section 8); Haltiuk (2026) reports nearly inherited Bolmo boundaries and proposes separating boundary placement from language modeling. We focus on how to construct cluster-aligned targets and expose the distinctions needed to predict them with limited lookahead. The targets either include every grapheme boundary or retain only the parent-tokenizer cuts that already coincide with one. We use grapheme clusters because their boundaries are representable in every encoding, position-only cluster targets are invariant to span-preserving edits, and cluster continuations are where encodings differ in what the first symbol reveals (Section 3); the choice does not presuppose that clusters are better modeling units.

We train small causal boundary predictors on matched FineWeb-2 text (Penedo et al., 2025) under UTF-8, UBE, and UBE-BE, a big-endian variant with UBE's routing and stream length. UBE differs from UTF-8 in both stream length and byte order; UBE-BE keeps UBE's length but reverses the bytes within each UTF-16 code unit, allowing a byte-order comparison at fixed stream length. For the every-cluster target on the 17-language FLORES-200 panel (NLLB Team et al., 2022), one-symbol lookahead yields 8.76% balanced error at scalar ends with UTF-8 and 0.06% with UBE. UBE-BE gives 8.62%, implicating byte order beyond stream shortening alone. False cuts inside scalars are measured separately; a rule-based mask can remove them without changing any decision at scalar ends (Section 4). On constructed pairs with identical left context whose next scalars lie on the same 256-codepoint page but require opposite decisions, the trained UBE predictors answer all 17,204 pairs correctly at one-symbol lookahead in each seed; UTF-8 and UBE-BE cannot, because both continuations begin with the same symbol.

Korean and Chinese provide a complementary test: every evaluated cluster is a single scalar, so the retained-parent task selects among inter-character boundaries. In this separate extension, UBE reduces total retained-parent errors relative to UTF-8 by 72.91% and 35.29%, respectively, at one-symbol lookahead. These totals include false cuts inside scalars, and every seed favors UBE over both UTF-8 and UBE-BE in each language. Grapheme boundaries here coincide with scalar ends, which every encoding exposes, so the gain concerns subword selection (Section 4.1). In eight more scripts, UBE reduces retained-parent errors by 67.32–99.55% at one-symbol lookahead, and where a script's main Unicode block lies on one 256-codepoint page, the same-length UBE-BE control stays close to UTF-8 (Section 4.2).

(a) Bits of a scalar that needs three UTF-8 bytes

Figure

(b) Same left context, opposite decisions

1 format bit

high byte (the 256-codepoint page)

low byte (position within the page)

first symbol

later bytes

Figure 2. How the first symbol can expose the distinction needed for segmentation. (a) Bit layout of a scalar that needs three UTF-8 bytes (x: codepoint bit) under UTF-8 and UTF-16; UBE writes the low byte first and UBE-BE the high byte first. (b) After the same Devanagari base, vowel sign I extends the cluster and letter MA starts a new one (outlined: target clusters; dotted circle: isolated mark). Both scalars share the high byte 09, so their first symbols coincide under UTF-8 and UBE-BE and differ only under UBE (P5, Section 3). Byte values are hexadecimal; one-symbol lookahead sees only the solid first symbol.

An audit of released conversions motivates the target construction. Bwen-8B, a released Bolmo-style conversion of Qwen3-8B-Base (Minixhofer et al., 2025; 2026), retains at least 97.07% of its parent's interior cuts in each of 18 selected high-fragmentation languages, and its cluster-internal cut count stays within 1.54% of the parent's. Deleting cluster-internal cuts yields supervision that respects cluster boundaries and is representable under UTF-8, UTF-16, and UBE. On the 17-language panel, this deletion reduces target units per normalized codepoint from 6.10×6.10 \times to 2.25×2.25 \times the English rate. Complementary corruption and scoring analyses characterize the released segmentation and establish how to compare a conversion with its parent.

Our contributions are:

• An analysis of the information available for boundary prediction at limited lookahead, tested with trained UTF-8, UBE, and UBE-BE predictors on grapheme and retained subword targets.

• Cluster-aligned boundary targets with explicit integrity, representability, and invariance conditions, separating target construction from learned boundary decisions.

• An audit of grapheme fragmentation in released conversions, with sequence-length accounting, corruption diagnostics, and a scoring protocol for parent/conversion comparisons.

All model diagnostics use released checkpoints and the FLORES-200 devtest split; the boundary predictors train on FineWeb-2 and are evaluated on FLORES-200. P1–P4 (Section 3) are properties of the targets that hold by construction; P5 is an information limit for causal predictors with limited lookahead; Section 4 measures trained probes and Section 5 measures released checkpoints.

References (80)