Tokenization

Tokenization is the process of converting raw text into the numeric token IDs a model consumes.

Most models use byte-pair encoding or a variant, which merges frequent character sequences into single tokens. A tokenizer tuned for English will fragment other languages into more tokens, which raises both latency and price for the same content.

All AI terms