Byte Pair Encoding (BPE)

Also known as: BPE

Category: NLP / Language Processing

A subword tokenization algorithm that iteratively merges the most frequent pairs of characters or character sequences to build a vocabulary.

Full Explanation

Byte Pair Encoding (BPE) was originally a data compression algorithm adapted for NLP tokenization. It starts with individual characters and iteratively merges the most frequent adjacent pairs to form new tokens, continuing until a desired vocabulary size is reached. BPE effectively handles rare and out-of-vocabulary words by decomposing them into known subword units. It is used in GPT-series models and many other modern language models. The algorithm strikes a balance between character-level and word-level tokenization, keeping common words intact while splitting rare words. BPE is language-agnostic and works well across diverse scripts and domains.

Related Terms

More in NLP / Language Processing

Explore More

  • AI Tools Library — Discover AI tools related to Byte Pair Encoding (BPE)
  • AI Education — Courses to learn about NLP / Language Processing
  • AI News — Latest news and updates