Notes [#4]

Tokenizer

A tokenizer splits text into tokens and gives each one a numeric ID. Common words become one token; rare words are split into smaller pieces.

Plain text
"The cat sat on the mat"
→ ["The", " cat", " sat", " on", " the", " mat"]
→ [464, 3797, 3332, 319, 262, 2603]

Figure 10 — Text becomes tokens, then IDs (the IDs here are illustrative).