the.ai

Foundations / Representation

verified

Byte-Pair Encoding

Byte-pair encoding builds a vocabulary by repetition. Start with single characters, count which adjacent pair occurs most often, merge it into one new symbol, and repeat. Common words fuse into single tokens; rare ones stay in pieces. The vocabulary is discovered from the corpus rather than chosen by anyone.

Viz primitive · update-spectrummerges = 8 · bars = 8

8 values. The left group decays steeply; the right group is 72% of the way to flat, and reads flatter than the left.

Token frequencies before merging and after, ordered most common first. Drag the merge count to watch frequent pairs fuse and the distribution redistribute.

8

Reviewed by opendroid · 2026-08-04