Definition
Tokenization
Tokenization converts input text into units that a model can map to integer IDs. A tokenizer can use complete words, subwords, characters, or bytes. Its vocabulary and segmentation rules determine how many tokens a string uses, so the same text can occupy different amounts of context in different models.
Count tokens with the model’s vocabulary
A toy subword vocabulary could split “rereading” into “re”, “read”, and “ing”, for a count of three. A vocabulary that contains “rereading” could encode the same word with one token. Both segmentations can reconstruct the word. When estimating context or fees, run the exact model tokenizer on the structured request, including the prompt and tool descriptions.
Intelligence at Scale by Shashank Agarwal

Explained in
Chapter 5: Inside the Machine
Everything you need to know about what's happening inside the box. No PhD required.
Related terms