Token-Free and Byte-Level Language Models

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

Section 1 of 13 · 2 min read

Reading settings

Definitions

Choose how many terms have tooltips.

Article links

Make inline references clickable

Notes & comments

The word café can occupy five UTF-8 bytes or six, depending on how the accent was encoded. A direct byte model spends one content position on each byte. What looks like the same word on screen can take up a different share of its context window.

A learned subword tokenizer maps strings to sequences of IDs whose lengths depend on the tokenizer and its input. Removing that tokenizer shifts the design choice into the model. ByT5 represents each byte directly. Other architectures allocate their large model to coarser positions and use smaller components at byte resolution.

We will follow Unicode text from scalar values to bytes, then count the positions each part of a model processes. These counts explain fixed and learned patch boundaries and help compare the likelihood scores for byte and subword models.

The encoding facts here build on Character Encoding, and the tokenizer mechanics build on the subword tokenization part, especially Byte Pair Encoding, SentencePiece, and Tokenization Challenges. If you want a refresher on why vocabulary size is a design tension at all, revisit The Vocabulary Problem.

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