Search

Search IconIcon to open search

Byte-pair encoding

Last updatedUpdated: by Jakub Žovák · 1 min read

Properties
created 15.02.2026, 11:45
modified 15.02.2026, 11:47
published Empty
topics Tokenization
authors Empty
ai-assisted No

The original algorithm operates by iteratively replacing the most common contiguous sequences of characters in a target text with unused ‘placeholder’ bytes. The iteration ends when no sequences can be found, leaving the target text effectively compressed. Decompression can be performed by reversing this process, querying known placeholder terms against their corresponding denoted sequence, using a lookup table. In the original paper, this lookup table is encoded and stored alongside the compressed text.