I recently built an animated explainer of Mamba vs Attention. This is the deeper dive it points to โ on exactly what Mamba's fixed-size state gives up, and what it doesn't.
Does Mamba just forget more than attention?
Yes, but with important nuances โ it's more subtle than a simple "forgets more."
What Mamba forgets vs what it keeps
The forgetting isn't random or uniform. Remember:
is learned and input-dependent. The model trains itself to set close to 1 for tokens it should preserve, and close to 0 for tokens it should discard. So in practice it learns selective forgetting โ not blanket amnesia.
The distinction that matters is what kind of information you need:
| Task type | Example | Attention | Mamba |
|---|---|---|---|
| Reasoning over nearby context | "Given the paragraph above, answerโฆ" | โ | โ good |
| Long-range pattern / theme | "What's the overall argument of this essay?" | โ | โ good |
| Exact verbatim recall | "What was the 3rd word on page 1?" | โ | โ ๏ธ risky |
| Counting over full context | "How many times does X appear?" | โ | โ often fails |
| Code reasoning | "Fix the bug in this function" | โ | โ good |
The Soofi S evidence
The paper actually confirms this directly. On the RULER benchmark at 1M tokens, the common word extraction (CWE) task โ which requires counting word frequencies across the entire document โ Soofi S collapses to ~3% accuracy beyond 32K tokens, while Nemotron (same architecture, different long-context data) holds at 60โ64%.
But on every other RULER subtask โ retrieval, question answering, reasoning โ the two models stay within 4โ6 points of each other all the way to 1M tokens.
So the failure is very specific. It's not "Mamba forgets everything at long context." It's more precisely:
Mamba struggles when the answer requires integrating exact counts or verbatim fragments spread across the entire context.
Why attention doesn't have this problem
Mathematically, attention always has:
Token is sitting there untouched at row 1, no matter what is. The softmax score can always attend back to it with full precision. There's no decay, no compression, no eigenvalue shrinking it away.
The practical picture
For 99% of real deployment tasks โ coding assistants, document Q&A, chat, reasoning, summarization โ Mamba's selective compression is good enough, and the speed/memory advantage at long context is enormous.
The gap only shows up in the narrow class of tasks that need exact, lossless recall of something specific buried thousands of tokens back. That's a real limitation, but it's a much smaller slice of real-world use than it might sound.
The Soofi team actually name this explicitly as their main target for the next iteration โ adding retrieval- and aggregation-style synthetic data to the long-context training phase to teach the model to be more aggressive about preserving those signals in .