2Mamba2Furious: Linear in Complexity, Competitive in Accuracy

Gabriel Mongaras, Eric C. Larson
2/19/2026
cs.LG

No official code found. Best implementation: gmongaras/2Mamba2Furious (3 stars, last commit 2026-03-29).

Abstract

Linear attention transformers have become a strong alternative to softmax attention due to their efficiency. However, linear attention tends to be less expressive and results in reduced accuracy compared to softmax attention. To bridge the accuracy gap between softmax attention and linear attention, we manipulate Mamba-2, a very strong linear attention variant. We first simplify Mamba-2 down to its most fundamental and important components, evaluating which specific choices make it most accurate. From this simplified Mamba variant (Mamba-2S), we improve the A-mask and increase the order of the hidden state, resulting in a method, which we call 2Mamba, that is nearly as accurate as softmax attention, yet much more memory efficient for long context lengths. We also investigate elements to Mamba-2 that help surpass softmax attention accuracy. Code is provided for all our experiments

View on arXivView PDF

Code Implementations(1)

Code for the paper "2Mamba2Furious: Linear in complexity, competitive in accuracy"

30Shell, PythonMay 20, 20256 months ago
attentionlinear-attentionmambaml-researchtransformers

Similar Papers

Cite this paper

@article{mongaras2026mambafurious,
  title  = {2Mamba2Furious: Linear in Complexity, Competitive in Accuracy},
  author = {Gabriel Mongaras and Eric C. Larson},
  year   = {2026},
  eprint = {2602.17363},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2602.17363v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2602.17363.svg)](https://codeofpaper.com/paper/2602.17363)

Discussion