Same token count, different byte splits: how BPE encoders can disagree on abc

A byte-level BPE inspector encodes the probe abc two ways and gets two-token results with different IDs and different byte boundaries. Ranked replay of learned merge rules produces IDs [97, 256] and splits the bytes as a | bc. A longest-prefix encoder over the same vocabulary produces [257, 99], splitting as ab | c. The tool learns two merges from a four-record corpus, with the first merge (bc) changing which adjacent pairs remain for the second. The discrepancy shows that token count alone does not identify the segmentation, because longest-prefix matching ignores the learned rank order that ranked replay respects.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.



Discussion (0)
Log in to join the discussion and vote.
Log in