AI engineering · 01 of 42

Tokenization

Words become model-ready pieces

Scroll

Words become model-ready pieces

A model never sees your sentence in the form you wrote it. A tokenizer chops the text into reusable fragments and maps each one to a number, and those numbers are the only thing that travels onward.

The fragments are not words. Common words usually survive intact; rarer ones get split, so engineering might arrive as engineer plus ing. Punctuation is generally a piece of its own.

Two practical consequences. Every context limit and every line of your bill counts tokens, not words. And the ratio between the two is not constant — code, identifiers, tables and non-English text all split more aggressively than ordinary English prose, so two inputs that look the same length on screen can cost noticeably different amounts.

Input
TEXT IN, NUMBERS OUT AI engineering feels simple. text Tokenizer maps [412, 13766, 6297, 13] and the pieces are not always whole words AI engineer ing feels simple . one word split into two pieces Every context limit and every invoice counts these, not words. Code, names, tables and non-English text all split differently.
One sentence becoming pieces, then numbers. Watch where engineering splits.