How I Built a BPE Tokenizer from Scratch (Part 1: Training)
I wanted to actually understand how tokenization works — not just use a library. So I built a BPE tokenizer from scratch. This is Part 1: training the tokenizer, counting pairs, and building the vocabulary.