All courses

Guided Course

understandtheory

Tokenization, Inside and Out

BPE, WordPiece, Unigram, SentencePiece, tiktoken — every algorithm, every tradeoff, every production implication.

0/14
Start course
14 lessons
  1. 1. From text to numbers6 min
  2. 2. The tokenizer pipeline7 min
  3. 3. Byte Pair Encoding (BPE)9 min
  4. 4. Byte-level BPE9 min
  5. 5. WordPiece — likelihood-driven subword merging8 min
  6. 6. Unigram — top-down probabilistic segmentation7 min
  7. 7. SentencePiece and tiktoken — the two dominant tokenizer implementations10 min
  8. 8. Vocabulary design7 min
  9. 9. Special tokens and chat templates7 min
  10. 10. Multilingual tokenization and fairness7 min
  11. 11. Token counting and cost estimation9 min
  12. 12. Tokenizer fragility and adversarial inputs10 min
  13. 13. Training a tokenizer from scratch9 min
  14. 14. The tokenizer-free future13 min
  15. Key takeaways4 min
  16. How to get certified3 min
  17. Your certificate