BPE merging
Change parameters and inspect the actual computation behind bpe merging.
Derivation steps / input data
- l + o → lo (5)
- lo + w → low (5)
- low + </w> → low</w> (3)
- low + e → lowe (2)
- low</w>
- low</w>
- low</w>
- lowe | r | </w>
- lowe | s | t | </w>
10Final token count
4Merges performed
This teaching version starts with characters and end-of-word markers, merging the most frequent adjacent pair. Real byte-level BPE also involves byte encoding, pre-tokenization, and special tokens.
Predict the effect of changing a parameter before inspecting the output. Identify the responsible term in the formula and explain how the teaching model differs from a real application.