Tokenization

Last updated

What is Tokenization?

Tokenization is the step where raw text is broken into small pieces called tokens, and each token is given a unique number. A token can be a whole word, part of a word, a punctuation mark, or even a space. The list of all possible tokens is the model’s vocabulary. Once text is turned into these numbered tokens, the model can look up an embedding for each number and start its math. By working with tokens instead of full sentences, the model keeps the input size steady and can handle new or rare words by slicing them into familiar sub-pieces. After the model finishes its work, the numbered tokens are turned back into text through the same vocabulary map, letting the user read the result.

Free resources to learn Tokenization

More in stage 13: Agent Loop

Tokenization: common questions

Can I learn Tokenization in Hindi?

This lesson is written in English. Once you sign in, open it in the interactive course and ask the AI tutor to explain Tokenization in Hindi or Hinglish. The tutor answers from this lesson’s own text, so it stays on the syllabus, and it runs on your own Google, OpenAI or Anthropic key.

Is this Tokenization tutorial for beginners?

It is lesson 18 of 101 in the free AI Agents roadmap, in stage 13, Agent Loop. If you are new to AI Agents, start from stage 1 and come back here in order; if you already know the earlier stages, this lesson stands on its own.

Still confused? Ask me