tokenizer-workshop
An educational Python project for learning tokenization step by step by building character-level, byte-level, and BPE tokenizers from scratch.
- 27
- Python
- 4 wk ago
An educational Python project for learning tokenization step by step by building character-level, byte-level, and BPE tokenizers from scratch.
Byte-Pair Encoding (BPE) (subword-based tokenization) algorithm implementaions from scratch with python
Byte pair encoding tokenizer for OpenAI models that encodes text into token IDs, decodes them back, and counts tokens.
Merge Barriers in BPE Tokenization: How Tokenizer Design Causally Determines Attention Head Specialization. Paper, 23 eval scripts, 86 result files, tokenizer definitions, 4 model checkpoints.
A from-scratch implementation of a GPT-style byte-level BPE tokenizer in pure Python, demonstrating vocabulary learning, pair-frequency merging, token encoding, decoding, and lossless text reconstruction.