Loading...
Implement BPE training for a given number of merges.
Starting with a character-level tokenization of the input text (each character is a token, words separated by spaces are kept separate), repeatedly find the most frequent adjacent token pair and merge them.
Input:
Output: The final vocabulary (unique tokens after all merges), sorted alphabetically, space-separated.
Rules:
low lower newest 2
e er l lo n ow s t w