AlgoViz

Tokens, vocabulary and learned representations

easy 8 min

The input pipeline changes representation twice.

Where it shows up

The same pattern appears across everyday software.

  • Why one rare part number consumes three positions

    Use a teaching vocabulary with the pieces re, pa and ck. The real split depends on the deployed tokenizer and its learned merge rules. The tokenizer emits three IDs for this example. Another encoding could give the entire word one ID, changing the sequence length before the model runs. Each ID selects a learned row. After lookup, order and subsequent model layers help build contextual representations. An ID is an address, not a semantic distance.