What is a tokenizer?

Definition

A tokenizer divides input into units such as whole words, word fragments, punctuation, bytes, or special symbols and maps them to numeric identifiers. The model is trained and executed using those identifiers rather than raw text.

Tokenizer behavior affects context usage, multilingual efficiency, code handling, and compatibility with a model checkpoint. Distinctive tokenization can also provide evidence about a model’s likely family, though it is not conclusive by itself.

Acronyms and aliases

text tokenizer variant

Frequently asked questions

Why do artificial intelligence models use tokenizers?

Models operate on numeric representations, so tokenizers provide a consistent mapping between human-readable input and the identifiers used during training and inference.

Can tokenizer behavior identify a model?

It can provide a useful clue because model families often use characteristic vocabularies and rules, but implementations can be copied or modified.

Videos explaining tokenizer