Hierarchical Autoregressive Transformers: Combining Byte- and Word-Level Processing for Robust, Adaptable Language Models

Pit Neitemeier, Björn Deiseroth, Constantin Eichenberg, Lukas Balles

The Limitations of Subword Tokenization

Modern Large Language Models (LLMs) rely on subword tokenization (such as Byte-Pair Encoding) to process text. While efficient for the languages they are trained on, these tokenizers introduce significant vulnerabilities. They create massive vocabulary overhead, are brittle to minor character perturbations like typos, and suffer from "fragmentation" when encountering new languages or domains. Fragmentation occurs when a tokenizer, unable to recognize new words, shreds them into individual bytes, drastically increasing sequence length and slowing down both training and inference.

Methods: Bypassing the Tokenizer

This paper introduces a Hierarchical Autoregressive Transformer that eliminates the need for a fixed tokenizer by processing text at both the character and word levels. The architecture consists of three primary components:

  • The Encoder: A tiny, bidirectional character-level transformer that reads individual letters and aggregates them into a single "word embedding."
  • The Backbone: A standard transformer (based on the Llama architecture) that processes these word embeddings to predict the next word's representation.
  • The Decoder: A second tiny character-level transformer that takes the backbone's output and spells out the predicted next word, character by character.
Hierarchical architecture for training and inference.

By splitting text along actual semantic boundaries (words) rather than arbitrary byte patches, the model maintains a stable sequence length while retaining the flexibility of character-level processing.

Key Insights: Solving Tokenizer Fragmentation

A critical advantage of this hierarchical approach is its immunity to tokenizer fragmentation. In standard models, moving from English to a language like German or Chinese causes the "Bytes Per Token" (BPT) metric to drop significantly, meaning the model must process more tokens for the same amount of information.

Comparison of Bytes Per Word (BPW) and Bytes Per Token (BPT) across languages.

As shown in the figure above, the baseline model's BPT shifts from 4.12 in English to 2.66 in German. The hierarchical model avoids this "tax" by operating on words, allowing it to adapt to new languages nearly twice as fast as traditional subword-based models.

Key Results and Performance

The authors compute-matched their hierarchical models against standard Llama-style baselines at the 1B, 3B, and 7B parameter scales. The results demonstrate that ditching the tokenizer does not come at the cost of performance:

  • Benchmark Parity: The hierarchical models matched baseline performance across 17 zero-shot downstream tasks, including MMLU and ARC.
  • Narrative Prediction: On the LAMBADA benchmark, the hierarchical model outperformed the baseline by a relative margin of up to 68% at the 7B scale.
  • Enhanced Robustness: The model proved significantly more resilient to input noise. When prompts were intentionally corrupted with typos or case changes, the hierarchical model suffered far less accuracy degradation than the subword baseline.
  • Efficient Adaptation: During continued pretraining, the model adapted to German 1.9x faster and Chinese 2.3x faster than the baseline, while exhibiting superior knowledge retention of its original English training.

Future Outlook

While the current model uses simple whitespace rules for word splitting, future iterations could employ universal Unicode segmentation to better handle languages without spaces. The success of this hierarchical approach opens doors for even more complex structures, such as sentence-level hierarchies or the integration of text diffusion models for character decoding, potentially leading to even more robust and long-context capable language models.

Summary updated

BibTeX
@inproceedings{neitemeier2025hierarchical,
  author = {Pit Neitemeier and Björn Deiseroth and Constantin Eichenberg and Lukas Balles},
  title = {{Hierarchical Autoregressive Transformers: Combining Byte- and Word-Level Processing for Robust, Adaptable Language Models}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=tU074jg2vS},
}
Figure