Byte Pair Encoding (BPE)

An algorithm that splits text into smaller, reusable word-pieces so an AI model can handle any word, even ones it has never seen.

Technically: A data-driven subword tokenization algorithm that starts from a character vocabulary and repeatedly merges the most frequent adjacent pair into a new token until it hits a target vocabulary size. Common words become single tokens while rare words break into known subword units, giving coverage of arbitrary text; BPE and its byte-level variant are common in autoregressive LLMs.

Category: Data & Representations

Related ideas