The custom tokenizer: why 16 thousand tokens suit this corpus better than 50 thousand, and what the whole table shows
The tax of not being English, the four decisions, and the side effect that was not in the plan.
Landed here from LinkedIn? This is chapter 01 of the experiment Antivision · Latent Rehearsal. It reads on its own; if you want the beginning, it is chapter 00.
A 7-million-parameter model used fewer bits than the 124-million GPT-2 in Portuguese. Not because it is better. GPT-2's BPE was trained on 40 GB of English. In English, 'tion' appears a lot and became a token. 'ção' did not. A Portuguese text costs 1.6 times more tokens, and every token costs context, quadratic attention and a serial generation step. We trained a 16-thousand-token tokenizer on our corpus. Running Portuguese dropped 47.6%. Accented Portuguese dropped 73.3%. And then our mini, 17 times smaller, came in below GPT-2 in bits per character in Portuguese. It would be easy to announce that and stop. It would be dishonest.
The three points
- Vocabulary 3 times smaller, embedding table 3 times smaller: 12.9 M parameters became 4.2 M in that piece alone.
- Split digits cost 58.3% more on text with numbers, and are the choice of Llama, Mistral and Qwen to add better. The benefit in arithmetic has not been measured here yet.
- The advantage exists only where the tokenizer charges the difference and vanishes where GPT-2 has corpus. In English, it is a tie. What the table proves is that a badly fitted tokenizer costs more than 17× the parameters.
From the chapter, the beginning
Why 16 thousand tokens suit this corpus better than 50 thousand, what we gain by making numbers worse on purpose, and the side effect that was not in the plan.
GPT-2's BPE was trained on WebText: 40 GB of pages in English. The algorithm, as we saw in the previous course, picks the pieces that appear a lot. In English, tion appears a lot. In Portuguese, ção appeared rarely in that corpus — so it never became a token.
What the chapter covers · 5 sections · 7 min
- The tax you pay for not being English
- The four decisions
- The result, measured
- The side effect that was not in the plan
- What was left undone
All chapters of the experiment · Antivision · Latent Rehearsal
- 00 · Antivision: an ELLM, a language model that rehearses in latent space before speaking
- 01 · The custom tokenizer: why 16 thousand tokens suit this corpus better than 50 thousand, and what the whole table shows
- 02 · Two architectures, one file: the fair duel between 2019 and what came after
- 03 · The geometry of the embedding: training starts with a perfect space and ruins it
- 04 · The lineage of collapse: five answers from computer vision, each measured on text
- 05 · The rudder and the world model: three versions of the same question, each measured against the last
- 06 · Method and mistakes: the rules of a legitimate comparison and the catalogue of our own errors
- 07 · Scale and budget: what it costs to reach GPT-3, and why VRAM is almost never the limit
- 08 · The workbench: serve, x-ray and train from the browser
- 09 · The hierarchical architecture: the whole project aligned to the four patterns of the world model
- 10 · What JEPA is, according to LeCun: two talks read concept by concept, and where each one applies
- 11 · Memory and horizon: two claims from LeCun that became experiments, and both hold for text
- 12 · Learned costs and inference modes: the three searches and the two sources of energy, measured
- 13 · The corrections from LeCun's talks: failure, passage, flag, measurement
- 14 · Consulted memory: a bank of abstract states read by attention
- 15 · What it costs and what it delivers: us, GPT-1 and GPT-2 on the only ruler valid across tokenizers
- 16 · The minimum was off the list: the day I measured my own search by energy
- 17 · ELLM: the right name for a language model that predicts in latent space and decides by energy
- 18 · Searching better does not fix the energy: three searches, the same text
- 19 · The inversion that did not repeat: the world model's cost appears once the ruler stops swinging
- 20 · What changed on 17/09: two new chapters and two corrections

Writes the GPT-2 course and runs the Antivision experiment, measuring every run before publishing the number. The LinkedIn posts start here and end in the chapters.
Follow on LinkedIn →