Back to research
Tokenizer

How a tokenizer splits numbers decides whether totals survive

A tokenizer trained on the target language saves around a fifth of the tokens, and how it handles digits decides whether arithmetic is learnable at all.

On German text, a tokenizer trained for German needs roughly 20 percent fewer tokens than a generic one. That saving lands twice: more content per training step, and a shorter context at inference for the same text.

Digits are the interesting part. If a tokenizer merges frequent number strings into single tokens, then 1000 and 1001 can have no structural relationship in the model's input at all. Arithmetic becomes memorisation of surface forms rather than a rule that generalises.

Splitting digits individually costs tokens and buys a representation in which place value is visible. For a model expected to add up a column in an invoice, that trade is not close.

One rule follows from all of this and is worth stating plainly: the tokenizer is never changed after pretraining. New vocabulary makes every embedding worthless, and there is no cheap migration.