Token-Free and Byte-Level Language Models › Summary

Michael BrenndoerferNovember 17, 20263 min read
Language AI HandbookAll chapters
Part 19 of 67Alternative Sequence and Generative Architectures
Chapter 135Token-Free and Byte-Level Language Models › Summary
Reading section 12 of 13 · Summary · 3 minSection 12 of 13 · 3 min

Section 12 of 13 · 3 min read

Reading settings

Definitions

Choose how many terms have tooltips.

Article links

Make inline references clickable

Notes & comments

Direct byte models use the 256 byte values as content symbols. Other tokenizer-free designs can use Unicode code points or learn coarser positions from bytes.

Track Unicode scalar values, UTF-8 bytes and model positions separately. The precomposed and decomposed spellings of café differ by one scalar value and one byte in the example.

UTF-8 under RFC 3629 uses one to four bytes per scalar value, excludes surrogates, and uses the shortest encoding with a maximum of U+10FFFF. Valid UTF-8 sequences are a proper subset of all byte sequences.

A valid UTF-8 string can have an incomplete byte prefix. Incremental decoders can buffer trailing bytes until a later chunk or final flush. Report the policy for rejecting, regenerating or repairing malformed output, and use byte-level constraints when every emitted prefix must admit a valid UTF-8 completion.

A normalization policy selects which text distinctions to preserve. NFC and NFKC compose the sample accent. NFD and NFKD keep it decomposed. Compatibility mappings can erase distinctions such as the ligature in the example.

The autoregressive byte model scores content bytes and a separate EOS outcome, starting from unscored BOS context. If the canonical token path decodes to the same bytes and uses the same EOS convention, the probability of that path with EOS lower-bounds the marginal string probability. Dividing the negative base-two logs of both probabilities by the same positive content byte count gives canonical bits per byte at least as large as marginal bits per byte. The two-byte example gives a gap of about 0.94 bits per byte.

Dense causal attention includes L(L+1)/2L(L+1)/2 pairs at length LL. Splitting the input into patches changes the global and local position counts. Pair counts compare masks. FLOPs, cache size and latency also depend on model and implementation details.

The five examples make different grouping choices. CANINE encodes code points with strided downsampling. ByT5 uses a byte-to-byte encoder-decoder. MEGABYTE uses fixed-width patches with global and local autoregressive models. The Byte Latent Transformer derives variable patch boundaries from next-byte entropy computed from the preceding bytes. H-Net learns routing jointly inside a hierarchical model.

Efficiency and robustness results depend on the model sizes, data, and evaluation settings. Compare bits per byte on the same scored bytes and state the EOS and context-window policies. Report conditional task scores, bytes per second and latency on the declared workload. A byte vocabulary represents every input byte directly. An unconstrained output distribution can assign positive probability to malformed UTF-8.

Comments

Add to the conversation

A question, a correction, or an example from your own work.

No comments yet. Be the first to share your thoughts!

Newsletter

Stay up to date

Get new articles, book updates, and notes on AI and technology.

Unsubscribe at any time. Privacy policy