Architecture

MambaByte

First page
MambaByte
Paper summary

MambaByte adapts the Mamba state-space architecture to learn directly from raw bytes, bypassing tokenization and all its well-known failure modes.

Ask this paper

Key points
01

Token-free modeling: Works at the byte level, eliminating issues like tokenizer inefficiency, cross-lingual bias, and brittle handling of typos, whitespace, and code.

02

SSM advantage: Byte-level modeling normally blows up autoregressive transformer cost because sequences get much longer - Mamba's linear-time state-space scan sidesteps this directly.

03

Outperforms subword transformers: At matched compute, MambaByte outperforms subword-based transformer baselines on standard language-modeling benchmarks.

04

Fast inference: Reports substantial inference speedups over byte-level transformers, showing that SSMs may be the natural backbone for tokenization-free modeling.

Abstract

Token-free language models learn directly from raw bytes and remove the inductive bias of subword tokenization. Operating on bytes, however, results in significantly longer sequences. In this setting, standard autoregressive Transformers scale poorly as the effective memory required grows with sequence length. The recent development of the Mamba state space model (SSM) offers an appealing alternative approach with a fixed-sized memory state and efficient decoding. We propose MambaByte, a token-free adaptation of the Mamba SSM trained autoregressively on byte sequences. In terms of modeling, we show MambaByte to be competitive with, and even to outperform, state-of-the-art subword Transformers on language modeling tasks while maintaining the benefits of token-free language models, such as robustness to noise. In terms of efficiency, we develop an adaptation of speculative decoding with tokenized drafting and byte-level verification. This results in a $2.6\times$ inference speedup to the standard MambaByte implementation, showing similar decoding efficiency as the subword Mamba. These findings establish the viability of SSMs in enabling token-free language modeling.

Every Monday
Get next week’s papers.
Subscribe on Substack