the.ai

Foundations / Representation

verified

Tokenization

A model does not see text, it sees numbers. Tokenization is the step that chops a string into pieces and assigns each an id. The choice of pieces is a trade: characters are universal but make sequences long, whole words are compact but leave the model helpless on anything unseen.

Viz primitive · update-spectrumvocab = 32000 · bars = 8

8 values. The left group decays steeply; the right group is 43% of the way to flat, and reads flatter than the left.

How the same text divides into tokens at one vocabulary size and another. Drag the vocabulary up to watch sequences shorten as the table grows.

32000

Reviewed by opendroid · 2026-08-04

  • arXiv:1508.07909 — Neural Machine Translation of Rare Words with Subword Units
  • arXiv:1808.06226 — SentencePiece: A simple and language independent subword tokenizer and detokenizer for Neural Text Processing