Taking models apart, one layer at a time.
I'm learning to train, evaluate and look inside neural networks, and writing it down as I go. Every post starts from the basics and builds up, with a picture for each step and a number at the end.
Now: tokenizers, bytes, and why Hindi costs more.
GPT-2 tokenizer (2019)
Loading…
o200k tokenizer (2024)
Loading…
Latest
The same sentence costs 5.6× more tokens in Hindi
GPT-2’s tokenizer needs 62 tokens for a Hindi line that takes 11 in English. To see why, we go all the way down to how a computer stores a single letter.
More writing
The next post is in progress. Follow along on RSS.
Lab
- Tokenizer playground
Type in any language and see how GPT-2 and a modern tokenizer split it.