Skip to main content
← Lab

bpegrow

confirmedcertificatePythonModel behavior & reasoningJuly 22, 2026

the question

Is greedy BPE token count monotone when a single valid merge is added to the vocabulary?

what came out

No. Inserting one merge at top priority can strictly increase a word's token count (aab goes 1 to 2, up to +3 on repeated spans). Appending at lowest priority is monotone: over 90272 exhaustive triples, lowest-priority raises the count 0 times, top-priority 462 times.

method & receipts

  • Result: confirmed
  • Reproducible one script re-runs the whole thing from scratch.
  • Tested — a correctness/benchmark suite ships alongside the code.

→ read the code and re-run it

github.com/v-code01/bpegrow