Neural networks operate on numbers — specifically on dense matrices of floating-point values. They cannot directly consume the letter "A" or the word "cat." Tokenization is the bridge: a deterministic procedure that converts raw text into a sequence of integers (token IDs) drawn from a fixed vocabulary, ready for embedding lookup.
The pipeline is three steps:
- Split the text into tokens — characters, words, or subwords.
- Map each token to a unique integer ID via a vocabulary table.
- Embed each ID into a dense vector by indexing into the embedding matrix (Track 3).
The split step is where everything interesting happens. Choose poorly and your model wastes capacity learning that "the" and " the" should mean the same thing, or that "preprocessing" should be related to "process." Choose well and the vocabulary itself becomes a useful inductive bias.
Why this is treated as a separate stage
Tokenization is decided once, frozen into a tokenizer file, and then used identically at training and inference time. You cannot change the tokenizer of a trained model without retraining it — the embedding matrix indices would no longer mean the same things. That's why every model card publishes its tokenizer alongside the weights, and why "what tokenizer does this model use?" is a fundamental question, not a trivium.