Tokenizer
What is Tokenizer?
In one sentence: A tokenizer is the tool that chops text into tokens and turns each token into a number the model can use.
Before a model can read your message, the tokenizer breaks it into pieces and gives each piece an ID number from its vocabulary. After the model answers, the tokenizer turns the numbers back into readable text. Each model family usually has its own tokenizer.
What does Tokenizer look like?
A tokenizer might turn "Hello world" into the numbers [15496, 995].
Why does Tokenizer matter?
The tokenizer decides how many tokens your text costs and can affect how well a model handles different languages.
Last updated · Fact-checked by The AI Math
Linking to this page from a lesson or article? <a href="https://getaimath.com/dictionary/tokenizer/">Tokenizer, explained simply</a> (The AI Math Dictionary)