Introduction
A language model does not predict raw visual text. It predicts tokens.
A token is the unit the model sees and predicts. A vocabulary is the set of tokens the model knows how to represent.
Tokenization is therefore not a harmless formatting step. It defines the units of the prediction problem.
In this chapter, you will compare:
- character tokens
- word tokens
- unknown tokens
- vocabulary size
- rare-word behavior
Subwords come next. First we need to see why characters and words each solve one problem while creating another.