The situation
A model can only calculate with numbers
A language model is one large calculation: numbers go in, numbers come out. Our running sentence is the cat sat on the mat. Before the model can do anything with it, the text has to become a list of numbers.
The first step is to cut the text into pieces called tokens and look each piece up in a fixed list, the vocabulary.