Mamba, a State Space Model developed by Gu and Dao, runs up to 5x faster than Transformers and scales linearly with sequence length, handling contexts up to 1 million tokens. The Mamba-3B model outperforms Transformers of equivalent size and matches Transformers twice as large, on both pretraining and downstream evaluation. It eliminates the quadratic bottleneck of the attention mechanism, the core scaling problem that makes long-context Transformers slow, memory-hungry, and expensive.
The quadratic bottleneck is not a minor inconvenience. In standard attention, every token attends to every previous token, making training O(n squared) in time and autoregressive inference O(n) per token. The KV cache grows linearly in space, and CUDA out-of-memory errors follow. Techniques like FlashAttention and Sliding Window Attention paper over this, but they do not solve it. Mamba replaces the attention mechanism entirely with a Control Theory-inspired SSM for inter-token communication, while keeping MLP-style projections for within-token computation.
The full article is worth reading for its treatment of how the SSM's state compression works, how Mamba achieves selectivity that earlier SSMs lacked, and what the architecture means for interpretability and AI safety research. The analogy-driven walkthrough of continuous versus discrete state spaces is unusually clear. If you are tracking what comes after the Transformer era, this is the technical foundation to understand first.
[READ ORIGINAL →]