Gated DeltaNet, From First Principles (Fable-5 vs Opus 4.8)
A tutorial that builds up everything you need — linear attention, state-space models, Mamba, the delta rule — and then assembles them into Gated DeltaNet (Yang, Kautz & Hatamizadeh, 2024; ICLR 2025).
Part 0 — The problem everyone is trying to solve
A standard Transformer's attention has two costs that hurt at long context:
- Training cost scales quadratically: attending every token to every other token is in sequence length .
- Inference cost grows linearly in memory: the KV cache stores keys and values for every past token, so generating token requires memory and compute per step.
The dream is a model that behaves like an RNN at inference time — a fixed-size state that gets updated once per token, giving memory and compute per generated token — while still being trainable in parallel like a Transformer. Linear attention, state-space models (Mamba), and DeltaNet are all members of this family. Gated DeltaNet is, in a precise sense, the merger of Mamba2 and DeltaNet, and to understand it you need both parents.
The unifying mental model for this whole family:
The model maintains a matrix-valued memory — think of it as a little key→value lookup table compressed into a single matrix. Each architecture differs only in how it writes to this matrix at each timestep.
Keep that sentence in mind; the rest of the tutorial is just filling in the write rules.
Part 1 — Linear attention: attention as a fast-weight RNN
1.1 From softmax attention to linear attention
Causal softmax attention computes, for query :
The is what forces us to keep every around. Linear attention (Katharopoulos et al., 2020) drops the exponential (or replaces it with a feature map , which we'll fold into and for simplicity):
That regrouping is the whole trick. Define the state and you get a recurrence:
This is an RNN whose hidden state is a matrix, updated by adding a rank-1 outer product each step. At inference you only ever store — constant memory regardless of context length.
1.2 The associative-memory reading
is exactly a classical linear associative memory (a "fast weight" matrix, in Schmidhuber's 1990s terminology). Writing stores the association "key → value ". Reading with retrieves a weighted blend of stored values: if and keys are roughly orthonormal, . This reading is what makes the later "delta rule" idea natural.
1.3 What's wrong with vanilla linear attention
The update is purely additive. Nothing is ever erased. Two failure modes follow:
- Memory collision / interference. A matrix can store at most about key–value pairs cleanly. Past that, retrievals blur together. With keys that repeat (which language is full of), old and new values for the same key get summed, not replaced.
- No recency control. The model can't choose to discount stale information, so performance degrades on long sequences and on tasks requiring up-to-date tracking of changing facts.
The two repairs to this problem are exactly the two parents of Gated DeltaNet:
| Repair | Idea | Architecture family |
|---|---|---|
| Gating (forget) | Multiply by a decay before adding | Mamba / Mamba2, GLA, RetNet |
| Delta rule (replace) | Erase the old value at this key before writing the new one | DeltaNet |
We take them one at a time. Gating is where the Mamba lineage comes in, so that's our prerequisite detour.
Part 2 — Mamba prerequisites: from state-space models to a scalar gate
You don't need all of Mamba to understand Gated DeltaNet, but you do need to see how the SSM lineage arrives at the update , because Gated DeltaNet's gate is precisely Mamba2's. This section builds that bridge.
2.1 Continuous state-space models
A (linear, time-invariant) state-space model from control theory maps an input signal to an output through a hidden state :
governs how the state evolves on its own (its eigenvalues set decay rates / memory timescales), controls how input enters, how the state is read out.
2.2 Discretization
To run this on token sequences we discretize with a step size . Using zero-order hold (ZOH):
giving the discrete recurrence:
Two things to internalize:
- means the state is exponentially decayed each step. With well-chosen (e.g., negative real parts), : this is a forgetting mechanism baked into the dynamics.
- acts like a knob between "ignore this token" ( means , : state coasts unchanged) and "reset on this token" ( large: state dominated by current input).
2.3 S4 → Mamba: making the SSM selective
S4 (Gu et al., 2021) used fixed per channel. Because everything is time-invariant, the recurrence equals a convolution and can be computed very fast — but the model treats every token identically. It cannot decide, based on content, "this token matters, remember it" or "this is filler, skip it."
Mamba (Mamba1, Gu & Dao 2023) made , , and crucially functions of the current input token ("selective SSM"). Now varies per token: the model dynamically chooses how much of its state to keep versus overwrite, conditioned on what it's reading. This input-dependence breaks the convolution trick, so Mamba introduced a hardware-aware parallel scan to keep training fast.
If you map SSM language onto attention language, a tight analogy appears: plays the role of key , the role of query , the value, and is a data-dependent forget gate on the state.
2.4 Mamba2: collapsing the gate to a scalar
Mamba1's is a diagonal matrix per channel — each state dimension decays at its own rate. Mamba2 (Dao & Gu, 2024, "Transformers are SSMs" / the SSD framework) restricts further to a scalar times identity: every dimension of the state shares one decay per timestep.
That sounds like a downgrade, but it buys an enormous structural win: with a scalar gate, the recurrence over the matrix state becomes
which is exactly gated linear attention with a scalar data-dependent decay. Because is a scalar, the whole sequence computation can be rewritten as attention with a multiplicative causal decay mask (the "state-space duality"), which maps onto matrix multiplications — the thing GPUs and their tensor cores are actually fast at. Mamba2 trains faster than Mamba1 at larger state sizes for this reason.
This update rule — scalar gate , additive rank-1 write — is the entire Mamba inheritance Gated DeltaNet needs. Interpretation: at each token the model can globally fade its memory (small ≈ "context switch, clear the board"; ≈ "keep everything"), then add the new association on top.
2.5 What gating still can't do
Gating's weakness is that it is indiscriminate. scales the whole matrix. Suppose the model stored "the user's name → Alice" and later reads "actually, call me Bob." The right operation is surgical: erase the value stored at the key "user's name" and write "Bob," leaving everything else intact. A scalar gate can only fade all memories together to make room. Rapid erase-and-update of a single association requires nuking unrelated memories too. That surgical operation is the delta rule.
Part 3 — The delta rule: DeltaNet
3.1 Memory update as online learning
Reframe the memory problem as online regression: at each step we want the memory matrix to map keys to values, i.e., minimize on the current pair. Take one gradient step with learning rate :
This is the classical delta rule (Widrow & Hoff, 1960), applied per token with a data-dependent learning rate predicted from the input. Rearranged into the form that will matter:
3.2 Reading the update: retrieve, erase, write
Decompose it (assume for intuition):
- Retrieve the value currently stored at key : .
- Erase a -fraction of it and write a -fraction of the new value: the net write is — an error-correcting update. If memory already predicts perfectly, nothing is written at all.
So where vanilla linear attention blindly accumulates and Mamba2 fades everything uniformly, DeltaNet performs a targeted replacement along the direction of the current key, leaving (approximately) orthogonal memories untouched. With it's a full overwrite of that key's slot; with the token is ignored.
This is why DeltaNet dominates gated architectures on associative recall benchmarks (MQAR, in-context retrieval): updating "key X now maps to value Y" is its native operation.
3.3 The geometry: a generalized Householder transform
The transition matrix applied to the old state is . For and this is a (generalized) Householder matrix: identity in all directions orthogonal to , and a contraction (or at , reflection) along . Two consequences:
- DeltaNet's state transition is not diagonal — it's identity-plus-rank-1. This is strictly more expressive than the diagonal/scalar transitions of Mamba-family models (it can express things like state swaps that diagonal transitions provably cannot), which is the formal reason DeltaNet-style models climb a rung on expressivity hierarchies.
- Eigenvalues are (multiplicity ) and . All in for , so the recurrence is stable.
3.4 DeltaNet's blind spot
The flip side of "identity in orthogonal directions": DeltaNet never forgets globally. A memory written at key persists until a sufficiently aligned key arrives to overwrite it. There is no "new document, flush the cache" operation. Empirically DeltaNet is great at recall but mediocre at tasks where gated models shine — language modeling perplexity, contexts with hard topic switches, length extrapolation — precisely the regimes where uniform decay helps.
So we have perfectly complementary failure modes:
| Mamba2 (gate ) | DeltaNet (delta rule ) | |
|---|---|---|
| Global forgetting / context switch | ✅ | ❌ |
| Precise per-key overwrite (recall) | ❌ | ✅ |
| State transition structure | scalar × identity | identity − rank-1 |
The obvious move is to take both. That's Gated DeltaNet.
Part 4 — Gated DeltaNet: the gated delta rule
4.1 The update rule
Gated DeltaNet equips the delta rule with Mamba2's scalar forget gate. Per token, the network predicts (from the input) a gate , a learning rate , and the usual :
Equivalently: first decay everything by , then perform the delta-rule erase-and-write on the decayed state. It's also exactly one step of online gradient descent on with weight decay — is an adaptive L2 decay on the fast weights, the adaptive learning rate. (This "memory update = online optimizer" framing is the seed of the follow-up line of work: test-time training, Titans, DeltaProduct, etc.)
Special cases make the lineage explicit:
- in the transition, keep the write term ⇒ Mamba2: .
- ⇒ DeltaNet.
- absorbed ⇒ vanilla linear attention.
4.2 Why this combination behaves well
The model now has two independent, content-controlled knobs each step:
- (clear the board): seeing an end-of-document token or a topic shift, the model can drive small and rapidly flush stale state — something pure DeltaNet structurally can't do.
- (edit one slot): seeing "X is now Y," the model can overwrite the association at key without disturbing the rest of memory — something pure Mamba2 structurally can't do.
Empirically (1.3B/3B-scale models in the paper), Gated DeltaNet beats both Mamba2 and DeltaNet on language modeling perplexity, zero-shot commonsense suites, in-context retrieval, length extrapolation, and long-context (LongBench) tasks. The recall-heavy tasks show the delta rule's contribution; the long-context and extrapolation results show the gate's.
4.3 The layer around the recurrence
The recurrence lives inside a fairly standard modern token-mixing block (mirroring Mamba2/GLA conventions):
- from linear projections, passed through SiLU and L2-normalized (normalizing keeps the Householder transition well-conditioned and the eigenvalue story of §3.3 valid).
- from a linear projection; multiple heads, each with its own .
- -style parameterization inherited from Mamba2's discretization (i.e., the gate is produced the same way Mamba2 produces ), .
- A short depthwise causal convolution (kernel ~4) over paths — borrowed from Mamba; cheap and consistently helpful.
- Output gating + RMSNorm on before the output projection (the "gated output" of GLA/Mamba2 blocks — note this output gate is a different thing from the state gate ).
4.4 Hybrids: Gated DeltaNet-H1 / H2
Because a fixed-size state can never match exact lookup over arbitrarily long contexts, the paper also builds hybrids that interleave Gated DeltaNet layers with sliding-window attention (H1) or with Mamba2 layers + a few SWA layers (H2). The local-attention layers handle precise short-range token interactions; the recurrent layers carry compressed long-range state. Hybrids improve quality further while keeping inference cost essentially linear. This recipe is what production models adopted — e.g., Qwen3-Next interleaves Gated DeltaNet layers with full-attention layers at a 3:1 ratio, and Kimi Linear builds on a Gated DeltaNet variant (KDA).
Part 5 — Why it's still fast: chunkwise parallel training
A recurrence that must run strictly token-by-token would waste GPUs during training. The standard solution across this family is chunkwise parallelism: split the sequence into chunks of length (e.g., 64); within a chunk, compute everything with dense matmuls (parallel, tensor-core friendly); across chunks, pass the state recurrently. Cost is -ish — linear in .
The complication unique to (Gated) DeltaNet is that its transition matrices don't commute and aren't diagonal, so naively composing them inside a chunk looks expensive. The fix (from the earlier "Parallelizing Linear Transformers with the Delta Rule" paper) is the classical WY representation of products of Householder matrices: a product can be written as — identity minus a low-rank correction — computable with triangular matmuls (the "UT transform") instead of sequential rank-1 updates. Gated DeltaNet extends this WY machinery to carry the cumulative gate products through the same algebra, at negligible extra cost. The upshot:
- Training throughput comparable to Mamba2, better than DeltaNet's original kernel.
- Inference: constant memory, one small matmul-and-update per token.
- Implementations live in the
flash-linear-attention(FLA) library and NVIDIA's released kernels.
You don't need the kernel details to use or reason about the model — just know that "Householder structure ⇒ WY trick ⇒ matmul-rich chunkwise form" is what makes the delta rule practical at scale.
Part 6 — One-page summary
The whole tutorial compresses into a table of write rules for the matrix memory , read out as :
| Model | Update rule | Forgetting | Per-key editing |
|---|---|---|---|
| Linear attention | none | none | |
| RetNet | fixed decay | none | |
| Mamba2 / gated LA | learned, global | none | |
| DeltaNet | none | yes | |
| Gated DeltaNet | learned, global | yes |
Mental model in one sentence: Gated DeltaNet is an online learner whose "weights" are the memory matrix — is its per-token learning rate (delta rule), is its per-token weight decay (Mamba2's gate) — wrapped in a hardware-efficient chunkwise algorithm.
Suggested reading order
- Katharopoulos et al., 2020 — Transformers are RNNs (linear attention).
- Gu & Dao, 2023 — Mamba (selective SSMs); skim §2–3 for discretization and selectivity.
- Dao & Gu, 2024 — Transformers are SSMs (Mamba2 / SSD; the scalar gate and duality).
- Yang et al., 2024 — Parallelizing Linear Transformers with the Delta Rule over Sequence Length (DeltaNet + WY/UT chunkwise algorithm).
- Yang, Kautz & Hatamizadeh, 2024 — Gated Delta Networks: Improving Mamba2 with Delta Rule (the paper this tutorial targets).
- Optional onward: Titans / test-time-training memory, DeltaProduct (multiple Householders per token), Kimi Linear's KDA — all generalizations of the "memory update as online optimization" view you now have.
Self-check questions
- Why can't vanilla linear attention ever "correct" a stored association, even in principle?
- In Mamba2's update, what happens to retrieval quality when many keys are nearly parallel? Why does the delta rule help exactly there?
- Show that with , the Gated DeltaNet transition matrix has eigenvalues . What does each eigenvalue "do" to memory?
- Why does restricting Mamba2's to a scalar enable a matmul-based (attention-dual) formulation, and why doesn't Mamba1's diagonal enjoy the same trick as cleanly?
- Why do hybrid layouts (Gated DeltaNet + sliding-window attention) outperform pure recurrent stacks on retrieval-heavy long-context tasks?
Opus 4.8 High
Understanding Gated DeltaNet (from the ground up)
This tutorial builds Gated DeltaNet layer by layer. Each section only assumes what came before it. The plan:
- Linear attention — the shared foundation everything else modifies.
- Mamba / Mamba2 — what "gating" means and the prerequisites you asked for.
- DeltaNet — what the "delta rule" means.
- Gated DeltaNet — fusing the two, which is literally what the paper does.
- Chunkwise training — how it's made fast (the hard part, kept conceptual).
- Why it works — the benchmark intuition.
Throughout, the state is a matrix — think of it as an associative memory that maps keys to values. is the key/query head dimension, the value head dimension. Keep that picture in mind; it's the thread tying everything together.
1. The foundation: linear attention
1.1 Why standard attention is expensive
Softmax attention computes, for each query, a weighted sum over all keys/values:
The problem is the term. Because it couples every query to every key through the softmax, you cannot precompute anything reusable — each of the queries does work, giving time and (during training) an attention matrix in memory.
1.2 The trick: drop the softmax
Suppose we remove the softmax (or replace with a simple feature map, then ignore normalization for clarity). Attention becomes:
The right-hand rewrite is the whole game. Associativity of matrix multiplication lets us regroup: instead of computing scalar scores first, pull the sum over inward:
Now is a single matrix that summarizes the entire past. It doesn't grow with sequence length — it's always .
1.3 The recurrent view (the mental model that matters)
Because is just plus one more term, we get a recurrence:
This is the form to internalize. At every timestep you:
- Write the new association by adding an outer product . Reading this back with a query that points at gives you roughly — that's why it's an associative memory.
- Read by multiplying the accumulated state by the query.
This is now a linear RNN with a fixed-size matrix state, so inference is memory per step and total — no quadratic blowup.
1.4 The catch that motivates everything else
stores key→value associations as a superposition of outer products. The number of (roughly orthogonal) associations you can pack into a -dimensional key space before they start interfering is bounded by . Once the sequence is longer than that, new writes collide with old ones — memory collisions — and exact retrieval degrades. Vanilla linear attention also never forgets: every write accumulates forever, so stale information piles up.
Two independent fixes to this problem are exactly what Mamba2 and DeltaNet represent. Gated DeltaNet combines them.
2. Mamba prerequisites: gating / adaptive forgetting
You asked specifically for the Mamba background, so here is the minimum you need, and why it matters for Gated DeltaNet.
2.1 What Mamba (S6) is, in one paragraph
Mamba comes from the state space model (SSM) lineage, not the attention lineage — but they converge. A classic SSM evolves a hidden state with fixed, input-independent dynamics: , . Mamba's key move ("S6", selective SSM) made , , and the timestep functions of the input. That data-dependence is what lets the model decide, per token, whether to absorb or ignore information — the "selective" in selective SSM. This is what made Mamba competitive with Transformers at language modeling while keeping linear-time, constant-memory inference.
2.2 Mamba2 and "state space duality"
Mamba2's central theoretical contribution (SSD — State Space Duality) is the observation that a selective SSM with a scalar state-transition can be written exactly as a form of linear attention with decay. That is: the SSM recurrence and the attention-style parallel form are two views of the same computation. This is what lets us discuss Mamba2 in the same language as Section 1.
Concretely, Mamba2's recurrence is linear attention with one extra term:
The only change from Section 1.3 is the scalar multiplying the previous state. That's the gate (also called a decay or forget gate).
2.3 What the gate actually does
is data-dependent — produced from the current input — and it scales down the entire state before the new write. Unrolling the recurrence makes the effect clear: an association written at time has been multiplied by by the time you reach . Old information decays geometrically. Define the cumulative product ; then
So gating gives the model adaptive forgetting: when is small, it rapidly wipes the memory (useful at a topic/context switch); when , it keeps everything (back to vanilla linear attention). This directly addresses the "stale information piles up forever" half of Section 1.4.
2.4 The limitation of gating (this is the whole reason Gated DeltaNet exists)
The decay is a single scalar applied uniformly to the whole state. If you want to forget one specific key→value association, you can't — shrinking fades everything equally. Gating is a blunt instrument: great at "clear the board," bad at "edit one cell." Hold that thought.
3. DeltaNet: precise, targeted updates
DeltaNet attacks the other half of the problem — the memory-collision / clumsy- write issue — using a classical idea.
3.1 The delta rule (Widrow–Hoff)
Vanilla linear attention writes by blindly adding . The delta rule says: before writing, look at what the memory already returns for this key, and only write the correction.
Step through it. The value currently stored under key is what you'd read back: . We want to move it toward the target by a fraction (the writing strength), giving a new value . We erase the old association and write the new one:
$$
Collecting terms gives the clean form:
The matrix is a generalized Householder transform: it selectively removes the component of the old memory that lies along , leaving everything orthogonal to untouched. Then writes the fresh association. This is the targeted edit that gating couldn't do.
3.2 Why this is "one step of gradient descent"
There's an illuminating second interpretation. Define a per-step loss measuring how well the memory recalls the right value for the current key:
$$
Take one gradient step from with learning rate :
$$
Identical to the boxed rule. So DeltaNet is doing online gradient descent on an associative-recall objective at every token, with as the learning rate. This "fast weights as online learning" lens is the unifying framework the Gated DeltaNet paper leans on, and it's worth carrying forward.
3.3 What DeltaNet buys, and its limitation
The delta rule corrects errors and overwrites specific stale associations instead of letting them collide — it's strong at in-context retrieval and associative recall. But notice what's missing: there is no global decay term. DeltaNet can edit individual entries beautifully, yet it has no fast way to clear the whole context when the document switches topics. It is the mirror image of Mamba2: precise but unable to do bulk erasure.
4. Gated DeltaNet: combining the two
Now the punchline is almost trivial, which is the point — the paper's insight is that these two mechanisms are complementary, so you just put both in.
4.1 The gated delta rule
Take the DeltaNet update and apply the scalar gate to the transition on the previous state:
Read off the two knobs and their extremes:
- — the forget gate (from Mamba2). Multiplies the whole state. promptly clears memory (bulk erasure); disables decay.
- — the writing strength (from DeltaNet). Controls the targeted delta edit. means "don't touch this key"; larger means "overwrite confidently."
The two corner cases recover the parents exactly:
| Setting | Reduces to |
|---|---|
| pure DeltaNet (targeted edits, no forgetting) | |
| , drop the Householder | pure Mamba2 gated rule |
| hard reset of memory |
So the model gets both rapid bulk erasure and precise per-key editing, and it learns per-token when to use each.
4.2 The unifying online-learning view
Using the "recurrence = closed-form online update" framework, every model in this tutorial is one row of the same table — each differs only in its per-step objective. (Here denotes the Frobenius inner product.)
| Model | Online objective | Resulting update |
|---|---|---|
| Linear attn | ||
| Mamba2 | ||
| DeltaNet | ||
| Gated DeltaNet |
The pattern: the first term is a retention regularizer ("stay close to the previous state"). Mamba2 and Gated DeltaNet relax it with , allowing controlled deviation from the past — that's forgetting expressed as loosening regularization. The second term is the recall objective; the delta variants fit the residual rather than directly, which is what makes the write targeted.
4.3 The actual neural block (practical details)
The recurrence above is the core. The full layer wraps it with the usual GLA/Mamba2-style machinery:
- Short causal 1-D convolution on before the recurrence (local mixing, consistently helps these models).
- SiLU activations, and crucially L2-normalization of the keys — the delta rule's stability depends on well-scaled keys.
- is parameterized in the Mamba2 style (from a learned scalar and a data-dependent , so -ish); is a simple linear projection through a sigmoid.
- Multi-head structure (each head its own small ), then an output gate + normalization before the projection out.
The paper also builds hybrids: interleaving Gated DeltaNet layers with a few sliding-window-attention or Mamba2 layers, which improves both quality and training throughput.
5. Making it fast: chunkwise training (conceptual)
This is the genuinely hard engineering and you can treat it as optional on a first pass — but here's the shape of it.
The dilemma. The pure recurrence (Sections 1–4) is sequential — bad for GPUs, which want big matrix multiplies. The pure parallel/attention form is matmul-heavy but . Neither is ideal for training.
The fix — chunkwise parallel form. Split the sequence into chunks of size . Then:
- Between chunks, carry the state forward recurrently (only steps).
- Within a chunk, compute everything as dense matmuls in parallel.
This gives linear time and tensor-core-friendly matmuls. For plain linear attention / Mamba2 this is straightforward. The complication for the delta rule is that within a chunk you have a product of Householder matrices , which is not a simple sum.
WY representation + UT transform. A classical result (Bischof & Van Loan) lets you write that product of Householder matrices compactly as , and the chunk's accumulated write as , where and are obtained by inverting a small triangular matrix (the "UT transform"). This turns the awkward cumulative product into a few clean matmuls per chunk. Gated DeltaNet's technical contribution is folding the gates into this machinery — by decaying each vector to a chunk boundary (the " / " notation in the paper) so the chunkwise algorithm still works with the extra decay terms. Net result: same hardware efficiency as Mamba2/DeltaNet, now with both mechanisms.
You don't need to re-derive this to use or understand the model — but knowing it exists explains why Gated DeltaNet trains at speeds comparable to Mamba2 despite the richer update.
6. Why it works: the benchmark intuition
The cleanest evidence is the S-NIAH ("needle in a haystack") suite, which isolates two skills: long-term retention of a needle, and filtering out distractors. The reported behavior at long context lines up exactly with the theory above:
- DeltaNet — strong retention (it can hold a precise association), but weak when distractors accumulate, because it has no bulk-clearing mechanism.
- Mamba2 — good at filtering (the gate decays junk), but retention collapses on longer sequences because the same decay also fades the needle.
- Gated DeltaNet — balances both: the delta rule preserves the needle while the gate clears distractors, so it stays strong on the hardest, longest cases (e.g. retrieving UUID-valued needles, where Mamba2 falls apart).
That's the entire thesis in one experiment: gating and the delta rule fix different failure modes, so combining them dominates either alone — across language modeling, commonsense reasoning, in-context retrieval, and length extrapolation, not just the synthetic probe.
7. One-page summary
- Linear attention: , . A fixed-size associative memory; linear time; but never forgets and suffers memory collisions.
- Mamba2 (gating): . Scalar data-dependent decay → adaptive bulk forgetting. Can't target one memory.
- DeltaNet (delta rule): . One step of online gradient descent on recall; precise targeted edits via writing strength . Can't do bulk forgetting.
- Gated DeltaNet: . Both knobs at once — for rapid erasure, for surgical updates. Trained efficiently via a gated extension of the WY/UT chunkwise algorithm.
If you remember one thing: the state is a key→value memory, and the literature is a sequence of better answers to "how should I write to and forget from this memory each step?" — add (linear attn) → decay-then-add (Mamba2) → edit-in-place (DeltaNet) → decay-and-edit (Gated DeltaNet).
Where to go next
- Paper: Gated Delta Networks: Improving Mamba2 with Delta Rule (Yang, Kautz, Hatamizadeh; ICLR 2025), arXiv:2412.06464.
- Prerequisite reading if a section felt thin: the original DeltaNet parallelization paper (Yang et al., 2024, "Parallelizing Linear Transformers with the Delta Rule"), and Mamba2 / SSD (Dao & Gu, 2024).
- Code: the NVlabs/GatedDeltaNet repo, and the
flash-linear-attention(FLA) library, which has tuned kernels for all of these models side by side — reading its implementations is the fastest way to make the chunkwise math concrete.