Mamba-3 — A Better Step, a Turning State, More Work per Byte
- 1Mamba — Selective State Spaces, Step by Step
- 2Mamba-2 — When a State Space Model Is a Masked Attention Matrix
- 3Mamba-3 — A Better Step, a Turning State, More Work per Byte
- 4VMamba — Scanning an Image Four Ways
- 5Mamba in RT-DETRv4 — What Could Make It Faster
Summary
Mamba-3 fixes three things Mamba-2 gave away for training speed: a crude step rule, a state that can only fade, and a decoder that leaves the GPU idle. A trapezoid step, a rotating state that can count parity, and a multi-input update that lifts decoding work per byte from 2.40 to 7.34.
Table of Contents
- 1. A Better Step2
- 2. A State That Can Turn2
- 3. More Work per Byte2
- 4. Smaller Changes to the Block2
- 5. Results2
- 6. Limitations2
- 7. Conclusion2
- 8. References2
- 9. Connections2
Models now think longer at test time, so the cost of running a model matters as much as its quality [LAHO26]. Mamba-2 [DAO24] was built to train fast; Mamba-3 asks what that cost at inference and fixes three gaps (§1, p. 2):
- A better step. Discretise with a trapezoid instead of a rectangle.
- A state that can turn. A complex transition, which on real numbers is a rotation set by the input. Linear models fail at state tracking, "e.g., simply determining parity of bit sequences".
- More work per byte. Decoding has "low arithmetic intensity", so the GPU sits idle. Feed the state several inputs at once (MIMO).
All three sit "on top of Mamba-2". Here are the two blocks side by side.
Brush up ;)
- ZOH, selection, and the NOTE on what Mamba's code really ran: Mamba — Selective State Spaces, Step by Step §2.
- The scalar decay , the mask L, the chunks: Mamba-2 — When a State Space Model Is a Masked Attention Matrix §3–5.
1. A Better Step
Measure a hill one stride at a time. Euler takes the height where your foot lands for the whole stride. The trapezoid averages it with the height where the stride began.
- Mamba's paper [GU23] wrote exact zero-order hold, but its code ran . Mamba-3 names that exponential-Euler: "This derivation justifies the formulas used in Mamba-1/-2's implementation" (§3.1, p. 6).
- Mamba-3 uses the exponential-trapezoidal rule: a weighted average of both ends.
Note: here is the continuous parameter (Mamba-2's is , p. 4). The new step (Prop. 1):
- The one new term is : the previous input, faded by one step.
- λ = 1 gives β = 0, γ = Δ: Mamba-2, unchanged.
- λ = ½ puts half the weight on each end. Mamba-3 learns per token and does not hold it at ½: "not enforcing this constraint is better for empirical performance" (Remark 3, p. 6).
- The new term is a width-2 convolution inside the recurrence, so the mask stays structured and the chunked algorithm still runs (Eq. 7).
In the toy below, halve the step and the λ = 1 error roughly halves while the λ = ½ error drops four times. Slide λ off ½ and it falls back.
What does it buy? Perplexity at 440M (Tab. 8): Euler 15.81, fixed ½ 15.76, learned λ 15.72. Small: the same default model reads 15.72 in Tab. 10a and 15.69 in Tab. 10b, so treat ~0.03 as noise.
2. A State That Can Turn
A dimmer can only fade a light. A switch can flip it. Mamba-2's lies between 0 and 1: a dimmer. The state shrinks but never points anywhere new.
Parity needs a flip. Real, non-negative transitions hurt state tracking (§3.2, p. 7), a limit Grazzi et al. [GRAZ24] proved. The fix: turn a 2-D state by π on every 1. Even count of ones, the arrow points right; odd, left.
A complex diagonal state of size N/2 is, on real numbers, a size-N state with rotations (Prop. 2):
- A scalar decay times 2 × 2 rotations, each by an angle the token sets.
- The "RoPE trick" (Prop. 3): rotations commute, so turn and by the running total of angles instead, and Mamba-2's kernel runs unchanged.
- Unlike RoPE [SU21], the angles come from the data, not a fixed schedule (p. 8). That is what lets the input decide the flip.
Watch the arrow: input angles count the ones, fixed angles count the steps.
| Model | Parity | Mod. arith. | Mod. arith., brackets |
|---|---|---|---|
| Mamba-3 | 100.00 | 98.51 | 87.75 |
| Mamba-3, standard RoPE | 1.56 | 20.70 | 2.62 |
| Mamba-3, no RoPE | 2.27 | 1.49 | 0.72 |
| Mamba-2 | 0.90 | 47.81 | 0.88 |
| Gated DeltaNet [−1, 1] | 100.00 | 99.25 | 93.50 |
Table. 1 State tracking, scaled accuracy (%, Tab. 5b of [LAHO26]).
- Fixed angles kill it: parity drops from 100.00 to 1.56.
- Mamba-3 is not the best here. Gated DeltaNet [YANG24a] with eigenvalues in [−1, 1] matches it on parity and wins on arithmetic.
3. More Work per Byte
Decoding one token, a head reads its N × P state, adds one outer product, and writes it back. A few FLOPs per number moved; the GPU mostly waits on memory.
Arithmetic intensity = FLOPs per byte moved. For one single-input step (SISO) with 2-byte values (Tab. 2):
At the paper's N = 128, P = 64 (App. D) that is 2.40 FLOPs per byte. An H100 matrix multiply runs at "about 295" (p. 9). The chip could do over a hundred times more for the same traffic.
MIMO gives , , a rank R:
- The state stays N × P, so the bytes barely move.
- The FLOPs grow about R times, and the update becomes a small matrix multiply, which is what tensor cores are built for.
- At R = 4: 7.34 FLOPs per byte, for 11 % more bytes.
- Still far below 295. MIMO helps; it does not close the gap.
The costs:
- Training is R times the work, not R² (p. 10), but the released kernels are about 2× slower at R = 4.
- Parameters are kept equal by shrinking the MLP: at 1.5B, 4,096 → 3,824 wide, "only 6.6%" (§4.1.1, p. 13).
4. Smaller Changes to the Block
- BCNorm: an RMSNorm on B and C, so pure Mamba-3 drops Mamba-2's norm before the output.
- B and C biases, after Yu and Erichson [YU25].
- No short convolution: the bias plus the trapezoid term "is empirically able to obviate" it (p. 12).
Ablation at 440M (Tab. 5a, perplexity): no bias, no trapezoid 16.68 → no bias 16.49 → Mamba-3 15.72. Put the convolution back: 15.85, worse. The bias does most of the work.
5. Results
1.5B models, 100B FineWeb-Edu tokens, 2K context, one recipe (§4.1):
| 1.5B model | Perplexity ↓ | Zero-shot avg ↑ | Decode step, ms ↓ |
|---|---|---|---|
| Transformer | 10.51 | 55.4 | — |
| Gated DeltaNet | 10.45 | 55.8 | 0.257 |
| Mamba-2 | 10.47 | 55.7 | 0.203 |
| Mamba-3 SISO | 10.35 | 56.4 | 0.156 |
| Mamba-3 MIMO (R = 4) | 10.24 | 57.6 | 0.179 |
Table. 2 Quality: Tab. 3 of [LAHO26] (average of seven zero-shot tasks, %). Decode step: Tab. 6, one H100, batch 128, BF16, state size 128.
- SISO beats Mamba-2 on the average at all four sizes, by 0.2 to 1.0 points.
- MIMO adds +1.2 over SISO at 1.5B.
- Prefill 16K tokens and decode 16K more, batch 128: Mamba-3 SISO 140.61 s against 976.50 s for Llama-3.2-1B on vLLM (Tab. 7; the vLLM figure is scaled up from batch 16, App. G). That Transformer is a different model, and it wins on prefill alone at every length.
6. Limitations
- Retrieval: Mamba-3 "struggles when extracting information from semi-structured or unstructured data" (SWDE, FDA; p. 13). The authors blame the fixed-size state and expect hybrids.
- MIMO trains about 2× slower at R = 4.
- The step rule's gain is near the noise, and second order is not enforced.
- Mine: everything stops at 1.5B, 100B tokens, 2K context. No vision.
7. Conclusion
- A better step: a learned trapezoid, one extra term; λ = 1 gives Mamba-2 back.
- A turning state: data-dependent rotations moved onto B and C. Solves parity; Gated DeltaNet does as well or better.
- More work per byte: MIMO lifts decode from 2.40 to 7.34 FLOPs per byte and gives +1.2 average, paid for in training time.
Every model so far reads tokens in one direction. A pixel has neighbours above and below too. The next post, VMamba — Scanning an Image Four Ways, reads a picture four ways. Stay tuned.
8. References
- [LAHO26] Lahoti, Li, Chen, Wang, Bick, Kolter, Dao, Gu. Mamba-3: Improved Sequence Modeling using State Space Principles. ICLR 2026, arXiv 2603.15569.
- [DAO24] Dao, Gu. Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality. 2024, arXiv 2405.21060.
- [GU23] Gu, Dao. Mamba: Linear-Time Sequence Modeling with Selective State Spaces. 2023, arXiv 2312.00752.
- [YANG24a] Yang, Kautz, Hatamizadeh. Gated Delta Networks: Improving Mamba2 with Delta Rule. 2024, arXiv 2412.06464.
- [GRAZ24] Grazzi et al. Unlocking State-Tracking in Linear RNNs Through Negative Eigenvalues. 2024, arXiv 2411.12537.
- [SU21] Su et al. RoFormer: Enhanced Transformer with Rotary Position Embedding. 2021, arXiv 2104.09864.
- [YU25] Yu, Erichson. Block-Biased Mamba for Long-Range Sequence Processing. 2025, arXiv 2505.09022.
- Mamba-3 code: github.com/state-spaces/mamba.
9. Connections
What this page builds on, cites or links to, and what points back at it. A plain box is a “builds on”; “cited” and “linked in the text” are the lighter links. Hover a box for a preview.
Related
- Paper · this builds on it (earlier in the series)
- Paper · same series: Mamba
- Paper · builds on this (next in the series)
- Read · cites the paper explained here
- Read · same series: Mamba
- Project · same tag: Systems programming
Go deeper
-
Start withRead
-
Paper
-
Paper
-
Paper
-
Paper
-
Read
-
Read
-
Paper
-
Read
-
Paper
-
Paper
-
Paper
-
Paper
-
Paper
-
Read
-
Paper
-
Paper
-
Read
-
Paper
-
Paper
-
You are hereMamba-3 — A Better Step, a Turning State, More Work per BytePaper
-
ThenPaper
-
Read
Go broader
- Sits under
- SeriesMambapart 3 of 5 · start from the first part
- Its tags on the map
- Also under these tagsText2SQL — Part 1: IntroductionLanguage modelsText2SQL — Part 3: Baseline ModelsLanguage modelsText2SQL — Part 4: State-Of-The-Art ModelsLanguage modelsText2SQL — Part 5: Final InsightsLanguage modelsJev — Thinking Fast, in One PassLanguage models
- Ask the mapWhat connects Mamba-3 and …type the other page's name; the map answers with the chain of links between them