VerifiedarXiv:2603.1556940 min
Architecture · State space models

Mamba-3: Improved Sequence Modeling using State Space Principles

Let the state rotate as it fades, and a fixed-size memory can keep a count.

Mamba-3 makes three changes to the Mamba-2 layer. Each step writes a blend of the current and the previous token, the state rotates as well as decays, and the per-token update into the state has rank four instead of one.

Explaining the paperMamba-3: Improved Sequence Modeling using State Space PrinciplesLahoti, Li, Chen, Wang, Bick, Kolter, Dao, Gu · CMU · Princeton · Together AI · Cartesia AI · arXiv:2603.15569 ↗

A 2026 paper from the authors of Mamba. All three changes add arithmetic to a decode step that spends its time waiting on memory, and the rotation takes the model from chance to 100 on the parity task.

Mamba-3 is a recurrent layer for language models, a drop-in replacement for attention that keeps a fixed-size state instead of a growing cache. It modifies Mamba-2 in three places, each motivated by a different view of the same recurrence:

  1. as a discretized differential equation: a better integration rule adds a second, lagged input term (the exponential-trapezoidal update);
  2. as a linear dynamical system: complex eigenvalues let the state rotate, which lets it count, and the rotation is computed as a data-dependent rotary embedding on B{\bm B} and C{\bm C};
  3. as a GPU kernel: the per-token write into the state becomes a rank-RR matrix product (MIMO), which raises the arithmetic per byte of a decode step.

Around the layer, the block drops Mamba-2's short convolution, normalizes and biases B{\bm B} and C{\bm C}, and alternates with a separate MLP. The last section reads the results, including where the paper's own claims run ahead of its tables.

Why a recurrent model's decode step is memory-bound

A Transformer answers a question about token 4,000 by attending to token 4,000: every key and value it has computed stays in a cache that grows with the sequence. A recurrent, or linear-time, layer keeps one fixed block of numbers, the state, updates it once per token, and reads each output from it, so a million-token sequence uses the same state memory as a ten-token one.

Mamba-2 is the version Mamba-3 starts from. Per head it keeps a state ht{\bm h}_t and updates it with values projected from the current token xtx_t: a decay αt\alpha_t and a gain γt\gamma_t (two scalars), a 128-number vector Bt{\bm B}_t that says which direction in the state to write along, and a 128-number vector Ct{\bm C}_t that says which direction to read from:

ht=αt ht−1+γt Bt xt,yt=Ct⊤ht{\bm h}_t = \alpha_t\,{\bm h}_{t-1} + \gamma_t\,{\bm B}_t\,x_t, \qquad y_t = {\bm C}_t^{\top}{\bm h}_t
(1)

Here xtx_t is one channel of the token. A head has 64 channels that share αt\alpha_t, γt\gamma_t, Bt{\bm B}_t and Ct{\bm C}_t, so the state of one head is a 64 × 128 matrix, 8,192 numbers. At the paper's 1.5B scale (model width 2,048, expansion 2, head dimension 64) there are 64 heads in each of 24 layers, about 25 MB of state in bf16 in total, independent of sequence length.

Generating one token loads that state, does a little arithmetic on it, and writes it back. Per head the step reads the 8,192-number state, Bt{\bm B}_t, Ct{\bm C}_t, the 64 channels of xtx_t and a scalar: 17,026 bytes at two bytes per number, by the paper's count. The arithmetic is one scaling of the state, one outer product added into it, and one matrix-vector product to read it out, which the paper's Table 2 counts as 5NP−P5NP - P operations for state size N=128N = 128 and head dimension P=64P = 64: 40,896. Operations per byte moved is the step's arithmetic intensity, here 2.4 (the paper rounds it to 2.5).

An H100 does about 989 trillion dense bf16 operations per second and reads about 3.35 TB/s from its memory, so a kernel needs about 295 operations per byte before arithmetic, rather than memory traffic, sets its run time. At 2.4 the decode step sits more than a hundred times below that line, and the GPU's compute units are idle for nearly all of it. Mamba-2, Gated DeltaNet and every other fixed-state layer are in the same position, because the state is small and read once per token.

So any change that adds operations without adding bytes costs almost nothing at decode time. All three of Mamba-3's changes add operations: a third term in the update for a more accurate step, a rotation for the ability to count, and a rank-four update to use the idle compute units.

How Mamba gets its recurrence from a differential equation

Linear-attention papers write equation (1) down directly. State space models derive it from a continuous-time system, a bank of linear differential equations driven by an input signal x(t)x(t):

h˙(t)=A(t) h(t)+B(t) x(t),y(t)=C(t)⊤h(t)\dot{{\bm h}}(t) = A(t)\,{\bm h}(t) + {\bm B}(t)\,x(t), \qquad y(t) = {\bm C}(t)^{\top}{\bm h}(t)

Tokens are treated as samples of that signal taken at times τt\tau_t, a distance Δt\Delta_t apart, and the system is discretized, turned into a recurrence over the samples. In Mamba, Δt\Delta_t is a positive number the model computes from each token (a softplus of a linear projection plus a per-head bias), and AtA_t is negative, so the system decays. A large Δt\Delta_t treats the token as a long stretch of time: the state forgets more of its past and writes the token in harder.

Over one step the system has an exact solution. Multiplying through by an integrating factor carries the old state forward by one exponential and adds the new input as an integral:

h(τt)=exp⁡ ⁣( ⁣∫τt−1τt ⁣A(s) ds)h(τt−1)  +  ∫τt−1τt ⁣exp⁡ ⁣( ⁣∫ττt ⁣A(s) ds)B(τ)x(τ) dτ{\bm h}(\tau_t) = \exp\!\Big(\!\int_{\tau_{t-1}}^{\tau_t}\! A(s)\,ds\Big){\bm h}(\tau_{t-1}) \;+\; \int_{\tau_{t-1}}^{\tau_t}\! \exp\!\Big(\!\int_{\tau}^{\tau_t}\! A(s)\,ds\Big){\bm B}(\tau)x(\tau)\,d\tauh(τt)=exp⁡ ⁣( ⁣∫τt−1τt ⁣A(s) ds)h(τt−1)+∫τt−1τt ⁣exp⁡ ⁣( ⁣∫ττt ⁣A(s) ds)B(τ)x(τ) dτ\begin{aligned}{\bm h}(\tau_t) &= \exp\!\Big(\!\int_{\tau_{t-1}}^{\tau_t}\! A(s)\,ds\Big){\bm h}(\tau_{t-1}) \\ &\quad + \int_{\tau_{t-1}}^{\tau_t}\! \exp\!\Big(\!\int_{\tau}^{\tau_t}\! A(s)\,ds\Big){\bm B}(\tau)x(\tau)\,d\tau\end{aligned}

Mamba freezes AA at the step's right endpoint, which gives the decay αt=eΔtAt\alpha_t = e^{\Delta_t A_t} for the first term. The second term, the state-input integral, is where discretization rules differ, because the model only sees the integrand at the two endpoints, the previous token and the current one. Zero-order hold, the classical rule, assumes the input was constant across the step and integrates exactly, giving a gain of At−1(eΔtAt−1)A_t^{-1}(e^{\Delta_t A_t}-1).

Mamba-1's paper says it uses zero-order hold. Its code computes the gain as γt=Δt\gamma_t = \Delta_t, a simplification Albert Gu confirmed in the repository (issue #129), and Mamba-2 inherited it. The deployed rule therefore combines an exact exponential for the decay with a rectangle for the input: the integrand is held at its right-endpoint value Btxt{\bm B}_t x_t across the step of width Δt\Delta_t. Mamba-3's first contribution is to place that rule in a family, an exponential decay times a quadrature rule for the integral, and to name it exponential-Euler; any other quadrature rule then gives another member of the family.

How the exponential-trapezoidal update works

The rectangle is exact only when the integrand does not change between the two tokens, and its error grows with how much it does change. The trapezoid rule from numerical analysis averages the two endpoints instead. Mamba-3 uses a weighted average with a weight λt\lambda_t chosen per token, which turns equation (1) into a three-term recurrence:

ht=eΔtAt⏟αtht−1  +  (1−λt)Δt eΔtAt⏟βt Bt−1xt−1  +  λtΔt⏟γt Btxt{\bm h}_t = \underbrace{e^{\Delta_t A_t}}_{\alpha_t}{\bm h}_{t-1} \;+\; \underbrace{(1-\lambda_t)\Delta_t\,e^{\Delta_t A_t}}_{\beta_t}\,{\bm B}_{t-1}x_{t-1} \;+\; \underbrace{\lambda_t\Delta_t}_{\gamma_t}\,{\bm B}_t x_tht=eΔtAt⏟αtht−1+(1−λt)Δt eΔtAt⏟βt Bt−1xt−1+λtΔt⏟γt Btxt\begin{aligned}{\bm h}_t &= \underbrace{e^{\Delta_t A_t}}_{\alpha_t}{\bm h}_{t-1} \\ &\quad + \underbrace{(1-\lambda_t)\Delta_t\,e^{\Delta_t A_t}}_{\beta_t}\,{\bm B}_{t-1}x_{t-1} \\ &\quad + \underbrace{\lambda_t\Delta_t}_{\gamma_t}\,{\bm B}_t x_t\end{aligned}
(5)

λt\lambda_t is a sigmoid of a per-head projection of the current token, so it lies in (0,1)(0,1). At λt=1\lambda_t = 1 the middle term vanishes and (5) is Mamba-2's update. At λt=12\lambda_t = \tfrac12 it is the classical trapezoid rule.

The factor eΔtAte^{\Delta_t A_t} inside βt\beta_t is the integrand's own decay. Write the integrand with AA frozen at AtA_t:

g(τ)  =  e(τt−τ)At B(τ) x(τ)g(\tau) \;=\; e^{(\tau_t-\tau)A_t}\,{\bm B}(\tau)\,x(\tau)

At the right endpoint τ=τt\tau = \tau_t the exponential is 1, so g(τt)=Btxtg(\tau_t) = {\bm B}_t x_t. At the left endpoint it is eΔtAte^{\Delta_t A_t}, because an input deposited one step earlier has decayed for one step. The last two terms of (5) are therefore Δt\Delta_t times a weighted average of gg at the two endpoints, with weights 1−λt1-\lambda_t and λt\lambda_t. Drag λ\lambda in Figure 1 to both ends and watch the amber rectangle miss the teal area in opposite directions.

Figure 1 · one step, as a quadrature problem
0.50
1.50
The teal curve is the integrand the step should integrate, from the previous token's position to the current one; the amber box is the constant height the rule uses instead. At λ=1\lambda = 1 the box sits at the current token's value, which is Mamba-1 and Mamba-2. Near λ=0.5\lambda = 0.5 the two areas nearly coincide. Shrinking Δ\Delta brings the endpoints together and every rule becomes accurate, which is what "order of accuracy" measures.

A worked step with one channel and B=1{\bm B} = 1. Take Δ=0.5\Delta = 0.5, A=−1A = -1 and λ=0.7\lambda = 0.7 for every token, so α=e−0.5=0.607\alpha = e^{-0.5} = 0.607, γ=0.35\gamma = 0.35 and β=0.3×0.5×0.607=0.091\beta = 0.3 \times 0.5 \times 0.607 = 0.091. Feed the inputs x=(1,0,0)x = (1, 0, 0):

From the second step on, the two states are identical. With constant Δ\Delta and λ\lambda, the trapezoid term writes a fraction λ\lambda of each token immediately and the remaining 1−λ1-\lambda one step later, already decayed, so the total weight a past token carries is unchanged. The difference appears when the settings vary by token, because the delayed share of token t−1t-1 is set by token tt's own λt\lambda_t and Δt\Delta_t. If the second token above had λ=0.2\lambda = 0.2 instead, its β\beta would be 0.8×0.5×0.607=0.2430.8 \times 0.5 \times 0.607 = 0.243 and the state after it 0.455, so the second token's λ\lambda sets how much more of the first token the state carries.

The accuracy argument comes with a condition the trained model does not meet. The paper's Remark 3 says the state-input integral is discretized to second order, with local error O(Δt3)O(\Delta_t^3), provided λt\lambda_t stays within O(Δt)O(\Delta_t) of 12\tfrac12. The released model leaves λt\lambda_t as an unconstrained sigmoid, and the paper's ablation (Table 8, 440M parameters) prefers that: learned λt\lambda_t reaches 15.72 test perplexity, fixed 12\tfrac12 15.76, and Mamba-2's λ=1\lambda = 1 15.81. So Mamba-3 as trained is not a second-order method.

Order of accuracy also describes the limit Δ→0\Delta \to 0, and Δt\Delta_t in Mamba is a learned, unitless number that is never driven to zero. The 0.09-perplexity gain from the third term is better read as a new data-dependent term in the recurrence than as reduced truncation error, and the next section shows what that term computes.

The trapezoid term as a two-tap filter

Call vt=Btxt{\bm v}_t = {\bm B}_t x_t the state-input, the vector a token contributes before any weight is applied. Then (5) reads:

ht=αt ht−1+(βt vt−1+γt vt){\bm h}_t = \alpha_t\,{\bm h}_{t-1} + \big(\beta_t\,{\bm v}_{t-1} + \gamma_t\,{\bm v}_t\big)
(6)

The bracket is a causal filter of width two over the state-inputs, with weights chosen per token. Recurrent layers already carry a short filter of this kind. Mamba-1 runs a depthwise causal convolution of width 4 over xx, and Mamba-2 runs one over xx, B{\bm B} and C{\bm C} together, followed by a SiLU. Gated DeltaNet, a linear-attention model that first erases part of its state along the written key before adding the new value (the "delta" rule), and the strongest baseline in this paper, has one too: its own ablation moves average perplexity from 27.35 to 28.95 at 400M parameters when the convolution is removed.

The two filters sit at different points. The short convolution is a separate layer with its own weights, mixing raw token features before B{\bm B} is applied. Mamba-3's filter has no weights of its own: its taps βt\beta_t and γt\gamma_t come from the same Δt\Delta_t, AtA_t and λt\lambda_t that produce the decay, and it mixes after B{\bm B} has been applied. Switch Figure 2 between the two layers and watch the fan-in move from the top lane to the bottom one.

Figure 2 · where the mixing happens
Three lanes: the token, the state-input Bsxs{\bm B}_s x_s, and what is added into the running state. Mamba-2 fans four tokens into the state-input through a separate convolution, before B{\bm B} is applied. Mamba-3 passes the token lane straight through and fans two state-inputs into the state instead, with weights the discretization already produced. Hover or tap a column to move the highlighted step.

A filter inside the recurrence would be a bad trade if it slowed training. Mamba-2 trains by writing the full sequence as one matrix product, Y=(L⊙CB⊤)X{\bm Y} = ({\bm L}\odot{\bm C}{\bm B}^{\top}){\bm X}, where L{\bm L} is a lower-triangular mask: entry (t,s)(t,s) is the weight with which token ss's write reaches token tt's read, the product of the decays in between times the gain. That form runs on tensor cores instead of as a sequential scan. Mamba-3's mask is the same decay mask times a matrix with one extra band:

L=[1α11α2α1α21⋮⋱][γ0β1γ10β2γ2⋮⋱]{\bm L} = \begin{bmatrix}1&&&\\ \alpha_1&1&&\\ \alpha_2\alpha_1&\alpha_2&1&\\ \vdots&&&\ddots\end{bmatrix}\begin{bmatrix}\gamma_0&&&\\ \beta_1&\gamma_1&&\\ 0&\beta_2&\gamma_2&\\ \vdots&&&\ddots\end{bmatrix}
(7)

The left factor is Mamba-2's decay mask. The right factor is the width-two filter as a matrix, γ\gamma on the diagonal and β\beta one below; Mamba-2 has Diag⁡(γ)\operatorname{Diag}(\gamma) there instead. Multiplying out, the αs+1\alpha_{s+1} inside βs+1\beta_{s+1} completes the decay product, and every entry below the diagonal becomes

Lts=(∏k=s+1tαk)(λsΔs+(1−λs+1)Δs+1),Ltt=λtΔtL_{ts} = \Big(\prod_{k=s+1}^{t}\alpha_k\Big)\big(\lambda_s\Delta_s + (1-\lambda_{s+1})\Delta_{s+1}\big), \qquad L_{tt} = \lambda_t\Delta_tLts=(∏k=s+1tαk)(λsΔs+(1−λs+1)Δs+1),Ltt=λtΔt\begin{gathered}L_{ts} = \Big(\prod_{k=s+1}^{t}\alpha_k\Big)\big(\lambda_s\Delta_s + (1-\lambda_{s+1})\Delta_{s+1}\big), \\ L_{tt} = \lambda_t\Delta_t\end{gathered}

against Mamba-2's (∏αk)Δs\big(\prod\alpha_k\big)\Delta_s. Figure 3 shows the three matrices for six tokens. Set the step size to constant and the off-diagonal entries match Mamba-2's at every λ\lambda, as in the worked example; only the diagonal shrinks. Switch the step size to vary by token and each column blends its own token's step with the next one's.

Figure 3 · the training mask is the decay mask times a two-band matrix
0.50
Left to right: Mamba-2's decay mask D{\bm D}, the two-band matrix W{\bm W} with γ\gamma on the diagonal and β\beta below it, and their product L{\bm L}. Tap any cell to multiply out that entry and compare it with Mamba-2's. One λ\lambda is used for every token here so the slider can cover 0 to 1; the trained model learns one per token. At λ=0\lambda = 0 the diagonal is empty: a token reaches the state only at the next step.

Applying the extra band costs little, and the paper's Mamba-3 training kernels run about level with Mamba-2's. With a filter inside the recurrence, Mamba-3 ships without the external convolution. The evidence is Table 5(a), at 440M parameters: a Mamba-3 with neither the trapezoid term nor the learnable B{\bm B}/C{\bm C} biases (a block change covered below) reaches 16.68 perplexity; adding the trapezoid gives 16.49; adding the biases gives 15.72; adding the short convolution back on top gives 15.85. That shows the convolution adds nothing once the other two are present. The table has no run with the convolution and without them, so it does not show that the new pieces do the convolution's job, and a 0.13-perplexity difference from one run each (the paper reports no seeds or variance) does not show that the convolution hurts.

Every row of that table already has the data-dependent rotation, so the paper never measures the rotation's effect on language perplexity. Its evidence is the formal-language table, covered in the next section.

The decode-time saving is smaller than removing a layer suggests. A width-4 convolution caches a three-token buffer between steps; Mamba-3's third term caches the previous Bt−1{\bm B}_{t-1} and xt−1x_{t-1}, a comparable amount. What goes is a layer, its activation and a kernel launch.

Why a rotating state can count: parity and modular counting

Parity is the smallest hard sequence task: read a string of zeros and ones and say whether the number of ones is even. A one-layer LSTM solves it, because its state passes through a tanh and multiplicative gates every step, and nonlinear updates are not constrained by the argument below. Mamba-2 scores 0.90 on it, which on the paper's scale is chance. The argument concerns layers whose update is linear in the state, which every model here is, because linearity is what allows the parallel training form.

Mamba-2's transition αt=eΔtAt\alpha_t = e^{\Delta_t A_t}, with Δt>0\Delta_t > 0 and At<0A_t < 0, is a real number strictly between 0 and 1 multiplying every entry of the state. Between writes the state can only shrink toward the origin along the line it is on; it can never flip sign. Grazzi et al. (2025) proved the consequence: a linear recurrent layer can compute parity only if some transition has an eigenvalue outside the non-negative reals.

The paper's example fix is a rotation, ht=R(πxt) ht−1{\bm h}_t = R(\pi x_t)\,{\bm h}_{t-1}, where R(θ)R(\theta) turns a two-dimensional state by angle θ\theta. Each 1 turns the state half a circle and each 0 leaves it, so after an odd number of ones it points the opposite way, and a fixed linear readout of the first coordinate changes sign. In Figure 4, set the angle to π\pi and press Play: the readout bar flips on every 1.

Figure 4 · one complex channel of the state, as a bit string arrives
token 1
1.26 rad
Each 1 turns the state by θ\theta and each 0 leaves it alone, while a small decay shrinks it every step. The bar under the circle is the readout, the state's first coordinate. At θ=0\theta = 0 the arrow never turns and the readout never changes sign, which is all Mamba-2 can express. At θ=π\theta = \pi the sign of the readout is the parity of the ones. At θ=2π/5\theta = 2\pi/5 the state returns to its start after five ones, which is counting modulo five.

The paper attributes the limitation to real eigenvalues, which it says "cannot represent rotational hidden state dynamics", and gives R(πxt)R(\pi x_t) as the cure. But R(π)=−IR(\pi) = -I, a real matrix with both eigenvalues equal to −1-1. Parity needs a negative eigenvalue, which is the fix Grazzi et al. proposed, and Gated DeltaNet with its eigenvalue range widened to [−1,1][-1,1] scores 100 on parity in Mamba-3's own results table, matching Mamba-3.

A non-real eigenvalue is needed one task later. The only real numbers that return to 1 after finitely many multiplications are +1+1 and −1-1, so a real transition can cycle with period at most two. Counting modulo 5 needs a transition that returns to the identity after five steps and not before, a rotation by 2π/52\pi/5. Grazzi et al.'s second theorem makes this precise: counting modulo mm, for mm not a power of two, needs an eigenvalue with a nonzero imaginary part. Set the angle in Figure 4 to 2π/52\pi/5 and the orbit closes after five ones; move it off that value and it no longer closes at five.

A complex eigenvalue factors into a decay and a turn:

eΔt(At+iθt)  =  eΔtAt⏟shrink⋅  eiΔtθt⏟turne^{\Delta_t(A_t + i\theta_t)} \;=\; \underbrace{e^{\Delta_t A_t}}_{\text{shrink}}\cdot\;\underbrace{e^{i\Delta_t\theta_t}}_{\text{turn}}

In real coordinates the turn is a 2 × 2 rotation acting on a pair of state entries. The paper's Proposition 2 states the equivalence: a complex state of N/2N/2 channels is a real state of NN numbers whose transition is one scalar decay times a block diagonal of 2 × 2 rotations, one angle per pair. A complex number is two real numbers, so this costs no extra memory. In the state-size experiments below, Mamba-3 matches Mamba-2 at half the state.

Complex numbers are not new to the Mamba line. The related-work section says they "were phased out in Mamba-1 and successors", but Mamba-1's own ablation reports a complex selective transition at 9.16 perplexity against 8.71 for the real one on language, and Mamba-1 switched to complex for its audio experiment. Mamba-3's addition is a data-dependent imaginary part that never needs complex arithmetic to evaluate.

Mamba-3 is also more restricted than the classical complex SSMs. S4D, S5 and the LRU give each channel its own complex eigenvalue, so each channel has its own decay rate and rotation speed. Mamba-3 gives each pair its own angle θt[i]\theta_t[i] but makes all pairs share one decay eΔtAte^{\Delta_t A_t}, because only a shared scalar decay keeps the mask in (7) a matrix of scalars, which is what keeps training a matrix multiply.

That structure sets a ceiling. The rotations act in fixed coordinate planes, so they commute, and the transitions one layer can compose form an abelian group: the layer can hold any number of independent counters that wrap around, and it cannot track a process where the order of operations changes the result. Shuffling a deck is the standard example, because two riffle shuffles applied in the other order give a different deck. In group terms, cyclic counting is reachable and the word problem for the permutation group S5S_5 is not, at any depth, assuming the standard conjecture TC0≠NC1\mathrm{TC}^0 \ne \mathrm{NC}^1. The circuit class matching what Mamba-3 adds is ACC0\mathrm{ACC}^0, which Barrington and Thérien tied to solvable groups; the paper labels it TC0\mathrm{TC}^0, a larger class that contains it.

Computing the rotation as a data-dependent RoPE

With the rotation, the recurrence to compute is Mamba-2's update with Rt{\bm R}_t applied to the previous state:

ht=eΔtAt Rt ht−1+Δt Btxt,yt=Ct⊤ht{\bm h}_t = e^{\Delta_t A_t}\,{\bm R}_t\,{\bm h}_{t-1} + \Delta_t\,{\bm B}_t x_t, \qquad y_t = {\bm C}_t^{\top}{\bm h}_t
(9)

Computed as written, this loses what Mamba-2 gained. Applying Rt{\bm R}_t to the state every step is work proportional to the 8,192-number state, and a matrix-valued transition breaks the scalar mask that lets training run as a matrix multiply.

The paper moves the rotation off the state with a change of variables. Define the running rotation Pt=R0R1⋯Rt{\bm P}_t = {\bm R}_0{\bm R}_1\cdots{\bm R}_t and the rotated state h~t=Pt⊤ht\tilde{{\bm h}}_t = {\bm P}_t^{\top}{\bm h}_t. Substitute ht=Pth~t{\bm h}_t = {\bm P}_t\tilde{{\bm h}}_t into (9):

Pth~t=eΔtAtRtPt−1h~t−1+ΔtBtxt{\bm P}_t\tilde{{\bm h}}_t = e^{\Delta_t A_t}{\bm R}_t{\bm P}_{t-1}\tilde{{\bm h}}_{t-1} + \Delta_t{\bm B}_t x_t

Since RtPt−1=Pt{\bm R}_t{\bm P}_{t-1} = {\bm P}_t (the rotations commute), the rotation on the previous state is exactly Pt{\bm P}_t, and multiplying both sides by Pt⊤{\bm P}_t^{\top} removes it. The transition is a scalar again, and the leftover rotation lands on the projections:

h~t=eΔtAt h~t−1+Δt(Pt⊤Bt)xt,yt=(Pt⊤Ct)⊤h~t\tilde{{\bm h}}_t = e^{\Delta_t A_t}\,\tilde{{\bm h}}_{t-1} + \Delta_t\big({\bm P}_t^{\top}{\bm B}_t\big)x_t, \qquad y_t = \big({\bm P}_t^{\top}{\bm C}_t\big)^{\top}\tilde{{\bm h}}_th~t=eΔtAt h~t−1+Δt(Pt⊤Bt)xt,yt=(Pt⊤Ct)⊤h~t\begin{gathered}\tilde{{\bm h}}_t = e^{\Delta_t A_t}\,\tilde{{\bm h}}_{t-1} + \Delta_t\big({\bm P}_t^{\top}{\bm B}_t\big)x_t, \\ y_t = \big({\bm P}_t^{\top}{\bm C}_t\big)^{\top}\tilde{{\bm h}}_t\end{gathered}
(10)

Instead of turning the state, the layer turns B{\bm B} and C{\bm C}, each by the rotation accumulated up to its own position. Follow what the output at position tt reads from a write at position ss. The weight is a dot product of two rotated vectors, and since Pt=PsRs+1⋯Rt{\bm P}_t = {\bm P}_s{\bm R}_{s+1}\cdots{\bm R}_t with orthogonal factors, the shared prefix Ps{\bm P}_s cancels:

(Pt⊤Ct)⊤(Ps⊤Bs)=Ct⊤ PtPs⊤ Bs=Ct⊤ Rs+1⋯Rt Bs\big({\bm P}_t^{\top}{\bm C}_t\big)^{\top}\big({\bm P}_s^{\top}{\bm B}_s\big) = {\bm C}_t^{\top}\,{\bm P}_t{\bm P}_s^{\top}\,{\bm B}_s = {\bm C}_t^{\top}\,{\bm R}_{s+1}\cdots{\bm R}_t\,{\bm B}_s(Pt⊤Ct)⊤(Ps⊤Bs)=Ct⊤ PtPs⊤ Bs=Ct⊤ Rs+1⋯Rt Bs\begin{aligned}\big({\bm P}_t^{\top}{\bm C}_t\big)^{\top}\big({\bm P}_s^{\top}{\bm B}_s\big) &= {\bm C}_t^{\top}\,{\bm P}_t{\bm P}_s^{\top}\,{\bm B}_s \\ &= {\bm C}_t^{\top}\,{\bm R}_{s+1}\cdots{\bm R}_t\,{\bm B}_s\end{aligned}

The pair is turned by the sum of the per-step angles of tokens s+1s+1 through tt, and by nothing else. The same cancellation makes rotary position embeddings (RoPE) encode relative distance, which is why the paper calls this a data-dependent RoPE. In Figure 5, move the key position and watch which bars add up on the dial.

Figure 5 · the turn between two positions is the sum of the angles from s+1 to t
Bars are the angle each token contributes. The query sits at the last position; hover or tap to move the key. The bars after the key, up to and including the query, add up, and the dial shows the total. Flip the toggle and every bar becomes the same height, so the dial reads off distance and nothing else. Swapping the data-dependent angles for fixed ones drops parity from 100 to 1.56.

Ordinary rotary embeddings fix a frequency per dimension and multiply it by the absolute position, so the angle between two tokens depends only on their separation. Mamba-3 keeps the mechanism and changes where the angle comes from: each token projects its own, and the layer carries the running sum. With Δt=1\Delta_t = 1 and a constant θ\theta, ordinary RoPE comes back. In the released kernels the per-step angle is Δt⋅πtanh⁡(⋅)\Delta_t \cdot \pi\tanh(\cdot), at most half a turn times that token's step size, and the accumulated angle is kept modulo 2π2\pi. At decode it is 32 numbers per head, updated with one add and one sine and cosine per token. The scan kernel sees a scalar decay and real vectors, as it did in Mamba-2, and no complex arithmetic runs anywhere.

In the released code only half the state rotates: the default rope_fraction is 0.5, so of the 128 state dimensions the first 64 carry rotations (32 angles) and the other 64 behave as a plain real decaying state, which a readout can reach regardless of what lies between write and read. The paper does not vary this fraction, so how much of the state needs to rotate is unmeasured. Proposition 2 also stacks the real state as all real parts followed by all imaginary parts, while writing the rotation as a block diagonal of adjacent 2 × 2 blocks; those need different orderings. The kernel for the ordinary rank-one layer (SISO, named in the next section) interleaves adjacent pairs, and the TileLang MIMO kernel pairs dimension ii with i+N/2i + N/2; the math is consistent, but the proposition cannot be copied into code as printed.

Combining the rotation with the three-term update gives the recurrence Mamba-3 runs. Each state-input keeps the rotation accumulated up to its own position, so the lagged term carries Pt−1{\bm P}_{t-1}, not Pt{\bm P}_t:

h~t=αt h~t−1+βt(Pt−1⊤Bt−1)xt−1+γt(Pt⊤Bt)xt\tilde{{\bm h}}_t = \alpha_t\,\tilde{{\bm h}}_{t-1} + \beta_t\big({\bm P}_{t-1}^{\top}{\bm B}_{t-1}\big)x_{t-1} + \gamma_t\big({\bm P}_t^{\top}{\bm B}_t\big)x_th~t=αt h~t−1+βt(Pt−1⊤Bt−1)xt−1+γt(Pt⊤Bt)xt\begin{aligned}\tilde{{\bm h}}_t &= \alpha_t\,\tilde{{\bm h}}_{t-1} \\ &\quad + \beta_t\big({\bm P}_{t-1}^{\top}{\bm B}_{t-1}\big)x_{t-1} \\ &\quad + \gamma_t\big({\bm P}_t^{\top}{\bm B}_t\big)x_t\end{aligned}
(11)

The paper writes (10) and (11) with a plain ht{\bm h}_t, the same symbol as the unrotated state of (9), while its appendix proofs call it h~t\tilde{{\bm h}}_t. The outputs yty_t agree between the two forms, which is all the propositions claim; the states differ by the accumulated rotation, which matters when inspecting a cached state.

Below is one decode step for one head at the paper's shapes. Line 2 lists what is carried between tokens: the state, the running angles, and the previous token's B{\bm B} and xx. Two lines have no counterpart in the main-text equations. DD is a per-head skip that adds a scaled copy of the input to the output, present in every Mamba implementation since Mamba-1. The final silu(z)\mathrm{silu}(z) is the block's output gate, which the paper writes only in Appendix C.

# one Mamba-3 decode step, one head.  d_state = 128, headdim = 64
# carried between tokens: h (64,128), phi (32,), B_prev (128,), x_prev (64,)
z, x, B, C, dt_r, A_r, lam_r, th_r = split(in_proj(u))   # u: (d_model,)

dt    = softplus(dt_r + dt_bias)     # this token's step size, > 0
A     = -heavy_tail(A_r)             # this token's decay rate, < 0
alpha = exp(dt * A)                  # the decay itself, in (0,1)
lam   = sigmoid(lam_r)               # the trapezoid blend lambda, in (0,1)
beta  = alpha * dt * (1 - lam)       # weight on the PREVIOUS state-input
gamma = lam * dt                     # weight on the current one

B = rms_norm(B) + B_bias             # 128 numbers; C is treated the same way
C = rms_norm(C) + C_bias
phi = (phi + dt * pi * tanh(th_r)) % (2 * pi)     # 32 running angles
B, C = rotate(B, phi), rotate(C, phi)             # first 64 dims of each

h = alpha * h + beta * outer(x_prev, B_prev) + gamma * outer(x, B)
y = h @ C + D * x                    # (64,)
B_prev, x_prev = B, x                # the extra cache the third term needs
return out_proj(y * silu(z))

MIMO: a rank-4 state update for the same state size

Back to the 2.4 operations per byte. Within one head the 64 channels share αt\alpha_t, Δt\Delta_t and Bt{\bm B}_t, so stacking them makes the state a 64 × 128 matrix, and each step adds an outer product of the token's 64-number value vector xt{\bm x}_t with its 128-number Bt{\bm B}_t. That outer product has rank one: 8,192 multiplications to produce 8,192 numbers of update.

Widen both factors: let xt{\bm x}_t be P×RP \times R and Bt{\bm B}_t be N×RN \times R, and the update becomes a matrix product of rank RR. The result has the same 64 × 128 shape, so the state does not grow, and the extra bytes are small because RR is small next to NN and PP. The operation count grows roughly RR-fold. In signal-processing terms this is the move from a single-input single-output (SISO) system to a multi-input multi-output (MIMO) one, hence the name. A rank-RR update is the more accurate description, because the RR "inputs" are RR learned rescalings of one projection, not RR separate data channels; the paper describes MIMO as motivated by inference efficiency.

Figure 6 · the rank of the update, and what it costs
R = 4
The update as a matrix product, in the orientation the released kernel uses, head dimension by state size. Raising RR widens the two input blocks and leaves the output block, the state, at its old size. Below, the step's arithmetic intensity on a log axis against the H100's bf16 break-even of 295. At R=1R = 1, which is Mamba-2, the step sits at 2.4; at R=4R = 4 it sits at 7.3 and does 3.4 times the arithmetic. Both are far below the line, so memory traffic still sets the time.

The paper's introduction says MIMO "increases decoding FLOPs by up to 4×4\times". Its Table 2 formulas give a SISO step 5NP−P5NP - P operations and a rank-RR step 4NPR+NP−PR4NPR + NP - PR. At the trained configuration, N=128N = 128, P=64P = 64, R=4R = 4, that is 40,896 against 139,008, a ratio of 3.40. For large NN and PP the ratio tends to (4R+1)/5(4R+1)/5, also 3.4 at R=4R = 4, because the NPNP operations that scale the old state do not grow with RR. A true 4×4\times needs R≥5R \ge 5. The bytes moved go from 17,026 to 18,946, up 11%.

Table 2's byte count also omits two things. Summing the tensor shapes it lists gives one PP-sized tensor more than the printed formula, and neither counts writing the updated state back. Counting the full round trip, the intensity is about 1.2 for SISO and 3.9 at R=4R = 4, so the step is even more memory-bound than the paper says. On the paper's count the distance to the 295 break-even shrinks from about 120× to about 40×; on the full round trip, from about 240× to about 75×.

The rank also costs training time. A rank-RR recurrence is RR state updates sharing one decay, summed into one state, and RR readouts, each contracting against that sum:

ht(j)=αtht−1(j)+ΔtBt(j)xt(j),ht=∑j=0R−1ht(j),yt(i)=(Ct(i))⊤ht{\bm h}_t^{(j)} = \alpha_t{\bm h}_{t-1}^{(j)} + \Delta_t{\bm B}_t^{(j)}{\bm x}_t^{(j)}, \qquad {\bm h}_t = \sum_{j=0}^{R-1}{\bm h}_t^{(j)}, \qquad {\bm y}_t^{(i)} = \big({\bm C}_t^{(i)}\big)^{\top}{\bm h}_tht(j)=αtht−1(j)+ΔtBt(j)xt(j),ht=∑j=0R−1ht(j),yt(i)=(Ct(i))⊤ht\begin{gathered}{\bm h}_t^{(j)} = \alpha_t{\bm h}_{t-1}^{(j)} + \Delta_t{\bm B}_t^{(j)}{\bm x}_t^{(j)}, \\ {\bm h}_t = \sum_{j=0}^{R-1}{\bm h}_t^{(j)}, \qquad {\bm y}_t^{(i)} = \big({\bm C}_t^{(i)}\big)^{\top}{\bm h}_t\end{gathered}
(12–14)

Every write reaches every read, so an algorithm that materializes all the write-read pairs runs the SISO computation R2R^2 times, 16 times at R=4R = 4. The chunked algorithm avoids most of that. SSD, the structured state space duality algorithm Mamba-2 trains with, splits the sequence into chunks, does a quadratic computation inside each chunk and a recurrence between chunks; the quadratic part is what grows as R2R^2. Shrinking the chunk by a factor of RR holds that part fixed while the number of chunks grows by RR, for an RR-fold cost overall. The released code uses chunk size 64 for SISO and 64/R64/R for MIMO. Measured, the MIMO training kernels are about 2× slower at R=4R = 4, better than 4× because the extra compute overlaps with memory movement.

The rank also adds parameters. B{\bm B} and C{\bm C} are shared across all heads in a layer, so widening their projections from DNDN to DNRDNR (for model width DD) is affordable. x{\bm x}, y{\bm y} and the gate z{\bm z} are per head, and widening their projection from DPDP to DPRDPR would multiply the largest part of the parameter count. Mamba-3 instead keeps the ordinary projection and rescales its output into RR copies with a learned, data-independent vector, DP+PRDP + PR parameters per head. To keep the total parameter count equal to the SISO model's, Mamba-3 offsets the extra MIMO parameters by narrowing the MLP: at 1.5B its inner width drops from 4,096 to 3,824, a 6.6% cut.

Earlier MIMO state space models, S5 and the LRU, used the term for the opposite purpose: they replaced S4's bank of independent per-channel SSMs with one shared multi-channel SSM to shrink the recurrent state, and the paper describes them as trading some expressivity for simpler training. Mamba-3 keeps the state at Mamba-2's size and does more operations per step.

The Mamba-3 block, layer by layer

The changes so far are inside the recurrence. The block around it changes too; Figure 7 switches between the two blocks.

Figure 7 · the Mamba-2 and Mamba-3 blocks
Switching between them shows what moves: the convolution and its activation disappear, an RMSNorm and a learnable bias appear on B{\bm B} and C{\bm C}, the input projection gains outputs for the trapezoid blend and the rotation angle, and the norm Mamba-2 placed before its output projection is gone. Alongside the diagram sit the paper's 440M perplexities for the two pieces it ablates.

The first change is an RMSNorm on B{\bm B} and C{\bm C} right after projection, which the paper calls BCNorm. Under the duality Mamba-2 established, C{\bm C} plays the role of the attention query and B{\bm B} the key, and the released kernel is called with Q=CQ = {\bm C} and K=BK = {\bm B}. Normalizing them is the SSM counterpart of the QK-norm that recent Transformers use for training stability. There is no softmax in an SSD layer; unit-RMS B{\bm B} and C{\bm C} bound the entries of CB⊤{\bm C}{\bm B}^{\top} directly, which Wortsman et al. identified as what stabilizes large-scale training. The paper credits BCNorm with letting it drop Mamba-2's post-gate RMSNorm, but reports no run without BCNorm anywhere.

The second change is a learnable bias added to B{\bm B} and C{\bm C} after the norm (and, in the code, before the rotation), one value per head per state dimension, initialized to ones. The initialization changes what the layer computes at the start of training. After RMSNorm each of b^\hat{{\bm b}} and c^\hat{{\bm c}} has unit root-mean-square over its 128 entries, so their inner product has mean 0 and a spread of about 128≈11\sqrt{128} \approx 11, set by content. Adding ones to both adds a constant:

(c^+1)⊤(b^+1)  =  c^⊤b^  +  ∑ib^i  +  ∑ic^i  +  128(\hat{{\bm c}}+\mathbf{1})^{\top}(\hat{{\bm b}}+\mathbf{1}) \;=\; \hat{{\bm c}}^{\top}\hat{{\bm b}} \;+\; \sum_i \hat{b}_i \;+\; \sum_i \hat{c}_i \;+\; 128(c^+1)⊤(b^+1)=c^⊤b^+∑ib^i+∑ic^i+128\begin{aligned}(\hat{{\bm c}}+\mathbf{1})^{\top}(\hat{{\bm b}}+\mathbf{1}) &= \hat{{\bm c}}^{\top}\hat{{\bm b}} + \sum_i \hat{b}_i \\ &\quad + \sum_i \hat{c}_i + 128\end{aligned}

Each sum runs over 128 roughly centred entries of unit size, so each has a spread of about 11, like the content term. The three add in quadrature to a spread of about 3×128≈20\sqrt{3 \times 128} \approx 20 around a mean of 128. At initialization most of every entry of C⊤B{\bm C}^{\top}{\bm B}, the score the decay mask LL multiplies, is a data-independent constant, so the layer starts as a nearly content-blind decaying average of the sequence and learns content selectivity on top. The rotation modifies this for the rotated half: for two positions far apart the 32 accumulated angles are effectively random, those 64 dimensions' share of the constant averages out, and about 64 remains. Figure 8 samples 3,000 token pairs both ways for each initialization the paper tried.

Figure 8 · what the B and C biases do to the CᵀB scores at initialization
The histogram shows 3,000 score entries C⊤B{\bm C}^{\top}{\bm B} for random unit-RMS B{\bm B} and C{\bm C} plus one fixed draw of the biases; the outline is the no-bias case. Pick an initialization: the readout gives the mean and spread, and the paper's 440M perplexity for that initialization from Table 10(a). Toggle the positions to far apart and the rotated half of the constant averages away.

The ablations fit that reading. Initializing the biases to zero costs 0.85 perplexity (16.57 against 15.72); a uniform [−1,1][-1,1] initialization, where the two biases are uncorrelated and their product sums to about zero, costs 0.35 (16.07). Any positive initialization works about equally well: U(0,1)U(0,1) gives 15.76 and ones held frozen 15.80. The paper offers its own hypothesis, that the biases "induce a convolution-like behavior", and the constant offset is this page's reading of the same numbers.

The paper cites Yu and Erichson's block-biased Mamba as motivation. Their Theorem 4 gives two separate sufficient fixes for single-layer universal approximation: block partitioning alone, or a channel-specific bias on B{\bm B} alone. Mamba-3's Table 10(b) finds B{\bm B} alone the worst of the four options, 16.68 against 16.52 for no bias, while C{\bm C} alone gives 15.98 and both 15.69. The bias on the read side carries the effect, and the cited theory is about the write side.

The third change moves the output norm. Mamba-2 put an RMSNorm after the gate and before the output projection, added because larger models were unstable. Mamba-3 removes it from pure models, and the released module has it off by default. Hybrids that interleave attention layers need a norm back, and the paper's Table 9 (1.5B hybrids, needle-in-a-haystack retrieval at up to 4,096 tokens, twice the 2,048 training context) varies two things at once: where the norm sits and whether it averages per head ("grouped") or across all heads of the layer. At 4,096, across the table's three needle tasks and both norm types (six comparisons), moving the norm before the gate wins five. Grouped against layer-wide shows no clean winner: across the same three tasks at both placements, the layer-wide norm is ahead in four of six, although the caption names the pre-gate grouped version best.

The fourth change is to the stack. Mamba-1 and Mamba-2 stack one block type with no separate MLP, and both papers ablated interleaving an MLP and found it slightly worse. Mamba-3 alternates its layer with a SwiGLU MLP block in the style of LLaMA. It reverses the earlier ablations, and the paper does not ablate it; it says only that the baselines follow their own papers' recipes.

The remaining nonlinearities in the layer are a softplus on Δ\Delta, a sigmoid on λ\lambda, the two RMSNorms, a SiLU on the gate, and an activation on AA that the paper does not mention and the code calls heavy_tail: 1+u1+u for u≥0u \ge 0 and 1/(1−u)1/(1-u) for u<0u < 0, negated and clamped at −10−4-10^{-4}. It approaches zero slowly for negative inputs, so a moderate projection still gives a long memory, and its docstring says it improves stability at higher learning rates. No convolution or activation acts on the xx path.

Mamba-3 results: perplexity, state tracking, retrieval and speed

Every model in the comparison (a Transformer, Mamba-2, Gated DeltaNet, Mamba-3 SISO and Mamba-3 MIMO at R=4R = 4) is trained on 100 billion tokens of FineWeb-Edu with the Llama-3.1 tokenizer and a 2,048-token context, at four sizes: 180M, 440M, 880M and 1.5B parameters. The Mamba models use expansion 2, state size 128 and head dimension 64. Downstream quality is the average of seven zero-shot tasks.

Figure 9 · the same five models at four sizes
1.5B
On the zero-shot average the ordering holds at every size: Mamba-3 SISO ahead of Gated DeltaNet ahead of Mamba-2, with the MIMO variant ahead of all of them. The size of the gap does not hold. At 1.5B the five span 2.2 points; at 180M they span 0.7, close to what a single run can produce on a seven-task average. Switch to perplexity and 180M breaks the ordering too, with Gated DeltaNet at 16.52 ahead of Mamba-3 SISO at 16.59.

At 1.5B the zero-shot averages are 55.4 for the Transformer, 55.7 for Mamba-2, 55.8 for Gated DeltaNet, 56.4 for Mamba-3 SISO and 57.6 for MIMO: +0.6 for SISO over the best baseline, a further +1.2 for MIMO, +1.8 in total, and +2.2 over the Transformer. The ordering repeats at 880M, 440M and 180M, which is stronger evidence than any single gap. Seven tasks give each model's average a sampling error of roughly half a point; scoring all models on the same examples cancels part of that, but with one run per model and no variance reported, 0.6 points is within noise and 1.8 is not.

The 180M row does not rank anything. OpenBookQA has four choices, so chance is 25%, and all five models score between 21.8 and 23.2. ARC-Challenge, also four choices, spans 27.3 to 28.2, and WinoGrande, a binary task, spans 51.2 to 52.9. Three of the seven columns are noise, and 100 billion tokens for 180 million parameters is about 556 tokens per parameter, 28 times the 20 that Chinchilla's compute-optimal fit recommends.

Perplexity is the cleaner measure. On FineWeb-Edu at 1.5B, Mamba-2 reaches 10.47, Mamba-3 SISO 10.35 and MIMO 10.24. The total 0.23 is a 2.2% drop, 0.022 nats (0.032 bits) per token. In the paper's own Mamba-2 column, going from 880M to 1.5B parameters (11.35 to 10.47) is worth 0.081 nats, so by this page's interpolation Mamba-3's gain is about what a 10-20% larger Mamba-2 would give.

The state-size sweep bears directly on decode speed, since state size sets the bytes per step. Across 440M models trained to twice the Chinchilla token count at state sizes 16, 32, 64 and 128, Mamba-3 with half the state reaches better pretraining perplexity than Mamba-2 while moving half the state bytes per generated token.

State tracking gives the largest differences in the paper. Table 5(b) reports scaled accuracy, where 0 is chance and 100 is perfect, on parity, modular arithmetic without brackets, and modular arithmetic with brackets:

The ordinary-RoPE row keeps the rotation but fixes its angles by position, and it fails too, so the angle has to depend on the token. Two points qualify the headline. Mamba-2's 47.81 in the middle column is far from chance (about 2.9× chance in raw terms), so the introduction's "no better than random guessing" is wrong for that cell. And Gated DeltaNet with negative eigenvalues, an existing linear model, ties on parity and beats Mamba-3 on both arithmetic columns; the paper calls Mamba-3 competitive, "matching parity and approaching" it.

Retrieval goes the other way, as the paper says. Extracting fields from semi-structured documents, Mamba-3 SISO trails the Transformer at 1.5B, 28.5 against 48.9 on SWDE and 23.4 against 58.4 on FDA, the expected cost of a fixed-size state. On question answering the gap is a few points: 40.1 against 46.6 on SQuAD and 64.5 against 67.5 on TriviaQA. On the easiest needle-in-a-haystack task at 4,096 tokens, twice the training length, Mamba-3 scores 88.2 against Mamba-2's 62.0. The Transformer scores 100.0 at 2,048 and 0.0 at 4,096, which the paper attributes to its RoPE failing to extrapolate past the training length.

MIMO wins perplexity and the zero-shot average at all four sizes (perplexity 16.46, 12.72, 11.11 and 10.24 against SISO's 16.59, 12.87, 11.23 and 10.35), and it loses the harder needle tasks at 4,096 tokens, 40.4 against SISO's 50.6 and 25.6 against 34.2. Its prefill takes about 20% longer, 19.44 s against 16.22 s at 16,384 tokens.

Measured latency confirms the arithmetic-intensity argument. One decode step at batch 128 on an H100, bf16, state size 128, 1.5B models, takes 0.156 ms for Mamba-3 SISO, 0.179 ms for MIMO, 0.203 ms for Mamba-2 and 0.257 ms for Gated DeltaNet. The rank-4 update does 3.4 times the operations, costs 15% more time than SISO, and is still faster than Mamba-2. Section 4.4 says SISO is fastest "across all configurations", but at fp32 with state size 64 Mamba-2's 0.295 ms beats SISO's 0.310; the table caption's narrower claim, bf16 at state size 128, holds.

End to end at 16,384 tokens, prefill plus decode, the recurrent models finish in 141 to 152 seconds and a Transformer served with vLLM (the PagedAttention engine) takes 977. The Transformer is Llama-3.2-1B, smaller than the 1.5B recurrent models, and its 977 seconds were measured at batch 16 and multiplied by 8 because batch 128 did not fit in GPU memory. Neither caveat changes the trend, only the ratio: the Transformer's cost grows with context length and the recurrent models' does not.

Mathematically the three changes are unrelated. All three meet the same two constraints: training must stay a matrix multiply, and the decode step, which is waiting on memory, must not move many more bytes. The trapezoid adds one band to a mask that already existed, the rotation adds 32 running angles per head and leaves the transition a scalar, and the rank-4 update uses compute that was idle. At 1.5B the MIMO model is 1.8 points above the best baseline on zero-shot average, and its decode step takes 12% less time than Mamba-2's (0.179 ms against 0.203 ms).

Provenance Verified against primary literatureHow we verify
Mamba-3 (2026)Lahoti, Li, Chen, Wang, Bick, Kolter, Dao, Gu, arXiv:2603.15569: the exponential-adjusted discretization family (Prop. 1), the complex-to-real rotation equivalence and the RoPE trick (Props. 2-4), the MIMO rank-R recurrence and its arithmetic-intensity argument (Table 2), and the block changes in Section 3.4. The output gate is written only in App. C, as Y ⊙ SiLU(Z).
Mamba-2 / SSD (2024)Dao & Gu, ICML 2024: the scalar-identity transition, the Y = (L ∘ CBᵀ)X parallel form and its 1-semiseparable mask, the multi-value head structure that shares B and C, and the post-gate RMSNorm that Mamba-3 drops.
Mamba (2023)Gu & Dao: selective SSMs, the input-dependent Δ, B, C, and the short causal convolution that Mamba-3 removes. Its released code computes Δ·B, not the ZOH gain its equation (4) prints; Albert Gu confirms this in state-spaces/mamba issue #129. Its Fig. 15 ablation has a complex selective transition at 9.16 perplexity against 8.71 for the real one.
S4 / S4D / S5Gu, Goel & Ré 2022 (S4, bilinear); Gu, Gupta, Goel & Ré 2022 (S4D, zero-order hold); Smith, Warrington & Linderman 2023 (S5): the discretizations in the paper’s Table 1, and the earlier MIMO formulation that shrank the recurrent state rather than spending compute on it.
Hochbruck & Ostermann (2010)Exponential Integrators, Acta Numerica. Their exponential Euler method has gain Δφ₁(ΔA), which is the zero-order-hold row of Mamba-3’s Table 1. The (exp decay, Δ gain) rule the paper names exponential-Euler is a Lawson / integrating-factor variant.
RoPE (Su et al., 2021)RoFormer: rotating query and key by their position so the dot product depends on their separation. Mamba-3 keeps the algebra and replaces the fixed per-position angle with a cumulative sum of data-dependent ones.
Grazzi et al. (2025)Unlocking State-Tracking in Linear RNNs Through Negative Eigenvalues (ICLR 2025), arXiv:2411.12537. Theorem 1: parity needs a transition eigenvalue outside the non-negative reals. Theorem 2: counting modulo m, for m not a power of two, needs one with a nonzero imaginary part.
Merrill, Petty & Sabharwal (2024)The Illusion of State in State-Space Models: under log-precision arithmetic, diagonal SSMs sit in uniform TC⁰, so assuming TC⁰ ≠ NC¹ they cannot solve the S₅ word problem at any depth.
Yu & Erichson (2025)Block-Biased Mamba for Long-Range Sequence Processing, arXiv:2505.09022. Theorem 4 gives two separate sufficient fixes for single-layer Mamba universal approximation: block partitioning alone, or a channel-specific bias on B alone.
Gated DeltaNet (2024)Yang, Kautz & Hatamizadeh, arXiv:2412.06464, Table S.1: removing the short convolution moves average perplexity from 27.35 to 28.95 at 400M parameters.
state-spaces/mamba codemamba_ssm/modules/mamba3.py: λ = sigmoid of a per-head projection (line 285); A = −heavy_tail(·) clamped at ≤ −1e-4; B and C biases initialised to ones (121-122); rope_fraction 0.5 so only half the state dimensions rotate (53); the post-gate norm off by default (58); a per-head D skip (140); no conv1d anywhere. ops/triton/mamba3/mamba3_siso_step.py: biases added before the rotation (142-143, rotation 161-173); angle Δ·π·tanh(·) accumulated mod 2π; the decode cache holds the state, the angles, the previous B and the previous x.
correctionFive checkable slips in the paper, verified against its own tables, its bibliography and the released code. (1) The introduction says MIMO "increases decoding FLOPs by up to 4×". Its Table 2 formulas give 3.40× at its own N = 128, P = 64, R = 4 (139,008 against 40,896), and the large-model limit (4R+1)/5 is also 3.4 at R = 4; a genuine 4× needs R ≥ 5. (2) Section 4.4 says Mamba-3 SISO has the lowest decode latency "across all configurations". Table 6 shows Mamba-2 faster at fp32 with state size 64, 0.295 ms against 0.310; the Table 6 caption’s narrower claim (bf16, state size 128) holds. (3) Section 3.2 cites "Theorem 1 of (Grazzi et al., 2024)", which the bibliography resolves to arXiv:2402.03170, an in-context-learning paper with no such theorem. The result is Theorem 1 of Grazzi, Siems, Zela, Franke, Hutter & Pontil (2025), arXiv:2411.12537. (4) The same section says real eigenvalues "cannot represent rotational hidden state dynamics" and offers R(πx) for parity, but R(π) = −I is a real matrix. A negative real eigenvalue solves parity; a non-real one is needed only for counting modulo m with m not a power of two. (5) The introduction says Mamba-2 performs "no better than random guessing" on the formal-language tasks, but Table 5(b) reports scaled accuracy (0 = chance), so Mamba-2’s 47.81 on arithmetic without brackets is about 2.9× chance in raw terms.

Questions you might still have

?

Do you need complex numbers to solve parity?
No. Multiplying the state by −1 on every 1 and reading its sign at the end computes parity, and −1 is a real number. Grazzi et al. (2025) proposed this sign flip for linear RNNs, and Gated DeltaNet with its eigenvalue range widened to [−1, 1] scores 100 on parity in Mamba-3’s own table, the same as Mamba-3. A non-real eigenvalue is needed one task further on, counting modulo 5: no real number other than ±1 returns to 1 after a finite number of multiplications, so a real transition cycles with period at most two. Even on the modular-arithmetic tasks Gated DeltaNet stays ahead, 99.25 and 93.50 against 98.51 and 87.75.

?

Is the data-dependent rotation the same thing as RoPE?
The algebra is the same and the angles are different. Ordinary rotary embeddings (the RoPE explainer on this site covers them) use a fixed frequency per dimension multiplied by the absolute position, so the rotation between two tokens depends only on how far apart they are. Mamba-3 accumulates a per-token angle produced by a projection of that token, so the rotation between two positions depends on which tokens lie between them. Swapping in ordinary RoPE and keeping everything else drops parity from 100 to 1.56.

?

How can a decode step do 3.4 times the arithmetic at almost the same speed?
The step is limited by memory traffic. Reading one head’s state and the token’s vectors moves about 17 kilobytes for about 41,000 floating-point operations, 2.4 operations per byte, while an H100 needs about 295 before arithmetic becomes the limit. The rank-4 update raises the operations by 3.4× and the bytes by 11%, to an intensity of about 7.3, still far below 295. Measured bf16 decode latency at batch 128 goes from 0.156 ms to 0.179 ms.

?

Does removing the short convolution save memory at inference?
Very little. It removes a layer, its SiLU and one kernel launch, but Mamba-3 has to cache the previous token’s B and x for the third term of its update, about as many numbers as Mamba-2’s three-token convolution buffer. The evidence is also narrower than the framing: Table 5(a) shows the convolution adds nothing on top of the trapezoid term and the B/C biases (15.85 against 15.72 perplexity, one run each), and there is no run with the convolution but without them.

?

How much of the 1.5B gap is real?
The ordering (MIMO, then SISO, then Gated DeltaNet, then Mamba-2 on the zero-shot average) repeats at all four model sizes, which is the strongest evidence in the table. A seven-task average has a sampling error of roughly half a point per model and the paper reports one run per model, so the +0.6 of Mamba-3 SISO over Gated DeltaNet is within noise and the +1.8 of MIMO is not. On perplexity, 10.47 to 10.24 at 1.5B is a 2.2% drop, roughly what a 10-20% larger Mamba-2 would give.

?

Why not give the state a full transition matrix, as an LSTM effectively has?
Training would lose its matrix-multiply form. Mamba-2 trains as Y = (L ⊙ CBᵀ)X, which needs the transition to be one scalar per step so the mask L holds products of scalars. Mamba-3’s rotations are block-diagonal, commute with each other and share one scalar decay, which is exactly what lets them be moved onto B and C, leaving a scalar transition again. A general dense transition has no such change of variables. In exchange, a single layer can only compose commuting operations, so non-commutative tracking such as the S₅ word problem stays out of reach.

?

Where does Mamba-3 sit next to Mamba-2 and S4?
S4 (explained on this site) has a structured complex transition per channel that does not depend on the input. Mamba made Δ, B and C depend on the token and used a real diagonal transition. Mamba-2 restricted the transition further, to one positive scalar per step, which made training a matrix multiply. Mamba-3 keeps that scalar decay and adds a block of rotations beside it, which restores complex eigenvalues while keeping the matrix-multiply form.

Footnotes & further reading

  1. The paper: Lahoti, Li, Chen, Wang, Bick, Kolter, Dao and Gu, Mamba-3: Improved Sequence Modeling using State Space Principles (2026). The kernels and the Mamba3 module are in state-spaces/mamba; the decode step above follows ops/triton/mamba3/mamba3_siso_step.py and modules/mamba3.py.
  2. The layer this one modifies: Dao & Gu, Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality (2024), explained here as Mamba-2; and Gu & Dao, Mamba, explained here as Mamba. The discretization discrepancy between Mamba-1's equation (4) and its code is issue #129.
  3. The discretization lineage: Gu, Goel & Ré, Efficiently Modeling Long Sequences with Structured State Spaces (S4, bilinear); Gu et al., S4D; Smith, Warrington & Linderman, S5 (zero-order hold, and the earlier MIMO formulation). For exponential integrators generally, Hochbruck & Ostermann, Exponential Integrators (Acta Numerica, 2010): what that literature calls exponential Euler has the gain Δφ1(ΔA)\Delta\varphi_1(\Delta A), which is Mamba-3's zero-order-hold row rather than its exponential-Euler row.
  4. Rotary embeddings: Su et al., RoFormer, explained here as RoPE. The Transformer baseline's architecture is from Attention Is All You Need and LLaMA.
  5. State tracking: Grazzi, Siems, Zela, Franke, Hutter & Pontil, Unlocking State-Tracking in Linear RNNs Through Negative Eigenvalues (ICLR 2025); Merrill, Petty & Sabharwal, The Illusion of State in State-Space Models; Sarrof, Veitsman & Hahn, The Expressive Capacity of State Space Models; and Delétang et al., Neural Networks and the Chomsky Hierarchy, the source of the scaled-accuracy protocol and the one-layer LSTM baseline.
  6. The bias motivation: Yu & Erichson, Block-Biased Mamba for Long-Range Sequence Processing (NeurIPS 2025). The bounded-logit mechanism behind QK-norm is from Wortsman et al., Small-scale proxies for large-scale Transformer training instabilities.
  7. The strongest baseline: Yang, Kautz & Hatamizadeh, Gated Delta Networks, whose Table S.1 is the source for the short convolution's value there (27.35 to 28.95 average perplexity without it).
  8. Evaluation: Penedo et al., The FineWeb Datasets; Hsieh et al., RULER for the needle-in-a-haystack tasks; and Hoffmann et al., Training Compute-Optimal Large Language Models, explained here as Chinchilla. The vLLM serving engine is Kwon et al., PagedAttention, explained here as PagedAttention.
  9. The hardware numbers: the roofline framing is Williams, Waterman & Patterson, Roofline (CACM 2009), which calls the quantity operational intensity. The 295 operations per byte is 989 dense bf16 TFLOP/s over 3.35 TB/s of HBM3 from NVIDIA's H100 datasheet; the dense figure, not the one with sparsity.