Byte-level tokenization is a method that treats text as a sequence of UTF-8 bytes rather than characters, and uses the 256 possible byte values as the smallest symbols. Characters from any language, as well as emoji and symbols, can always be represented as a sequence of bytes, so unknown tokens (unrecognized symbols) cannot occur in principle.
There are two main ways to use it.
- Byte-level BPE: bytes are the initial symbols, and BPE merges are learned on top of them. Frequent byte sequences are merged into single symbols, so sequences do not get much longer. It was used by GPT-2 in 2019, and in the same year Wang et al. studied it in detail for machine translation (BBPE).
- Token-free: bytes are not merged and are fed to the model one byte at a time. The vocabulary consists only of the 256 byte values and a few special tokens. ByT5 (2021) showed that this approach is practical even with a standard Transformer.
Ordinary BPE, which uses characters as the smallest symbols, cannot represent characters that are not in its vocabulary. In languages with many distinct characters, such as Japanese and Chinese, rarely used characters also take up vocabulary slots. Using bytes as the smallest symbols eliminates both problems. In exchange, a single symbol may represent only part of a character, and sequences tend to get longer.

