Let's Build the GPT Tokenizer — A Complete Guide to Tokenization in LLMs

tokenizationbyte-pair-encodinggpttiktokensentencepieceunicode

Abstraction: Karpathy tokenizer video as book chapter

Key points:

Connections: Andrej Karpathy · Fast AI · Tiktoken · Sentencepiece · GPT-4 · Tokenization · Byte Pair Encoding · Large Language Models

Source: https://www.fast.ai/posts/2025-10-16-karpathy-tokenizers.html