In plain words: Shows that state-space models like Mamba and attention are two views of the same math, linked by a class of structured matrices. The new Mamba-2 core layer runs 2 to 8 times faster than Mamba's while still matching Transformers on language modeling.
Abstract · Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality
While Transformers have been the main architecture behind deep learning's success in language modeling, state-space models (SSMs) such as Mamba have recently been shown to match or outperform Transformers at small to medium scale. We show that these families of models are actually quite closely related, and develop a rich framework of theoretical connections between SSMs and variants of attention, connected through various decompositions of a well-studied class of structured semiseparable matrices. Our state space duality (SSD) framework allows us to design a new architecture (Mamba-2) whose core layer is an a refinement of Mamba's selective SSM that is 2-8X faster, while continuing to be competitive with Transformers on language modeling.
Tri Dao, Albert Gu
arXiv:2405.21060 · cs.LG · submitted May 31, 2024
abstract · pdf · html · ICML 2024