BPE Algorithm Step by Step
Speed:
Keyboard: Space Play/Pause · Next Step · R Reset
Step 0 of 0 Merges
Initialization Starting with individual characters as base tokens
Token Display
Pair Frequencies (current)
Vocabulary (0 Tokens)
0
Current Tokens
0
Merges Performed
1.0×
Compression
💡 How BPE Works

Byte Pair Encoding starts with individual characters and iteratively merges the most frequent adjacent pairs into new tokens. In the example aaabdaaabac, first aaZ, then abY, etc. are merged until the desired vocabulary size is reached.