Bit-level BPE: Below the byte boundary

Sangwhan Moon, Tatsuya Hiraoka, Naoaki OkazakiarXiv 2025 · DOI

Introduction

Standard byte-level tokenization in Large Language Models (LLMs) is surprisingly inefficient for character-rich languages like Chinese, Japanese, and Korean (CJK). While modern LLMs use "byte-level fallbacks" to handle rare characters, this approach imposes a significant computational "tax." A single CJK character typically requires three UTF-8 bytes. When a model falls back to bytes for long CJK strings, sequence lengths triple, increasing memory usage and latency. Furthermore, UTF-8's deterministic nature means these sequences contain redundant prefixes that the model must redundantly learn to generate.

Methodology: Breaking the 8-bit Boundary

The authors propose Bit-level BPE, a tokenizer-agnostic and lossless compression technique that eliminates redundancy by breaking the traditional 8-bit byte boundary.

The Bit-level BPE process: redistributing 8-bit bytes into a 6-9-9 bit configuration to deduplicate redundant prefixes.

The approach follows four key steps:

  1. Bit Redistribution: Instead of treating a 3-byte CJK character as three 8-bit units ($8+8+8=24$ bits), bits are redistributed into a 6-9-9 configuration.
  2. Prefix Extraction: The first 6 bits serve as a "prefix" token. In CJK blocks, many characters share the exact same leading bits.
  3. Deduplication: For sequences sharing a 6-bit prefix, the model emits the prefix token once, followed by unique 9-bit "extended byte" tokens for each character.
  4. Vocabulary Expansion: The byte-level vocabulary is expanded from 256 to 512 tokens to accommodate the 9-bit units.

By removing redundant prefix generation—which the authors liken to a model playing "Fizz Buzz" while trying to write a novel—the model can focus more resources on learning linguistic semantics.

Experimental Setup

The method was evaluated on machine translation tasks using a 65M parameter Transformer trained from scratch. Three language pairs were tested:

  • English-Chinese (en-zh): Using the WMT20 dataset.
  • English-Japanese (en-ja): Using the WMT20 dataset.
  • Japanese-Korean (ja-ko): Using a subtitle translation dataset (3M pairs) and AI Hub data.

Results and Performance

Bit-level BPE achieved a 22.22% reduction in sequence length for the byte-level portion of the text. Across entire corpora, total sequence length dropped by 3% to 6%.

Comparison of sequence length and entropy across different language pairs, showing consistent reductions in sequence length.

Key performance metrics include:

  • Translation Quality: In the ja-ko task, the BLEU score improved significantly from 19 to 24.6.
  • Reduced Hallucinations: Byte-level models often struggle with "decoding errors" (invalid UTF-8). Bit-level BPE reduced these errors in the ja-ko task from 1522 down to 121.
  • Perceived Throughput: The paper introduces "Perceived Tokens Per Second" (TPS). While a larger vocabulary might slightly slow raw token generation, the reduced sequence length means the final text is delivered to the user faster.

Discussion and Limitations

While effective, Bit-level BPE has trade-offs. The additional 256 tokens increase embedding and logit layer memory. Additionally, the 6-9-9 split is optimized for CJK; other scripts might require different configurations to be efficient.

Fine-tuning existing pre-trained models (like Llama-2) with this method is challenging, as new 9-bit tokens start "undertrained," potentially leading to catastrophic forgetting. Consequently, Bit-level BPE is currently best suited for models trained from scratch. Future work may explore dynamic bit-boundary optimization to maximize compression across diverse datasets.

Summary updated

BibTeX
@misc{moon2025bit,
  author = {Sangwhan Moon and Tatsuya Hiraoka and Naoaki Okazaki},
  title = {{Bit-level BPE: Below the byte boundary}},
  year = {2025},
  eprint = {2506.07541},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.07541},
}
Figure