LLM Architecture

What Replaces RoPE? Implicit Position in NoPE, Short Conv, and KDA

Contents
  1. 1. NoPE: Zero-Logit Counting vs. Set Equivariance
  2. 2. Causal Depthwise Short Convolutions
  3. 3. From Memory Interference to Delta Rule and KDA
  4. 4. When Linear State Beats KV Cache—and Production Tradeoffs
  5. 5. Further Reading
  6. References

Strip every rotary matrix and absolute position vector out of a Transformer, and an obvious question follows: can the model still tell "dog bites cat" from "cat bites dog"?

The answer hinges entirely on the attention mask. Without positional encodings, a bidirectional encoder collapses into a permutation-equivariant set map. In an autoregressive decoder, however, the lower-triangular causal mask breaks symmetry enough to induce exact ordering—albeit with slower convergence on fine-grained local phrases. Recent hybrids such as Llama 4, Qwen3-Next, and Kimi Linear pair three mechanisms to balance local syntax against constant-memory long context: implicit NoPE counting, causal depthwise short convolutions, and channel-gated delta-rule linear attention (GDN / KDA).


1. NoPE: Zero-Logit Counting vs. Set Equivariance#

In a bidirectional encoder lacking positional embeddings, every position queries the same multiset of keys. Swapping input tokens $x_a$ and $x_b$ merely swaps the corresponding rows of the output tensor, leaving the model blind to word order.

Inside an autoregressive decoder, the lower-triangular causal mask forces position $i$ to observe prefix $[0, i]$—a strict superset of everything visible at position $i - 1$. How a decoder turns that nested prefix structure into explicit numerical coordinates is often misdescribed as assigning a high score to <BOS>.

Suppose an attention head assigned logit $1$ to <BOS> and $0$ elsewhere; after Softmax, the <BOS> weight at position $i$ would be $\frac{e}{e + i}$, carrying a non-uniform offset. Instead, Kazemnejad et al. (2023, Theorem 1) showed that NoPE encodes positions using all-zero attention logits ($q_i^\top k_j = 0$ across all $j \le i$). Every position produces strictly uniform weights $\alpha_{i,j} = \frac{1}{i+1}$, paired with a Value projection emitting $v_0 = 1$ at <BOS> and $v_{j>0} = 0$ everywhere else. Taking the weighted average directly returns reciprocal position coordinates:

$$o_i = \sum_{j=0}^i \alpha_{i,j} v_j = \frac{1}{i+1} \implies [o_0, o_1, o_2, o_3] = \Big[1,\; \frac{1}{2},\; \frac{1}{3},\; \frac{1}{4}\Big]$$

Subsequent normalization and FFN layers easily read those monotone values to recover token indices without rotary embeddings. Frontier designs have turned this property into three concrete recipes: (1) interleaving 3:1 local RoPE sliding windows with global NoPE plus intra-document masking, validated by Cohere (RNoPE-SWA) and Hugging Face's SmolLM3-3B (see the Smol Training Playbook); (2) applying inference-time logarithmic query scaling $\mathrm{scale}(t) = 1 + s \log(1 + \lfloor t/\beta\rfloor)$ ($s=0.1, \beta=8192$) in global NoPE layers—used in Llama 4 iRoPE and Marin 535B (paralleling Su's entropy-invariance scaling) to keep Softmax entropy sharp across 100K+ prefixes; and (3) DroPE (Sakana AI, 2025), which treats RoPE strictly as pretraining scaffolding, drops it afterwards, and recalibrates for under $1\%$ of pretraining compute to recover zero-shot length extrapolation.

NoPE Theorem 1 Construction: Uniform Causal Matrix (qᵢᵀkⱼ=0) × v₀=1 Encodes Position Causal Matrix α (logits = 0) Value col Decoded Out × 10001 (<BOS>)1.00 (pos 0)1/21/2000 (tok 1)0.50 (pos 1)1/31/31/300 (tok 2)0.33 (pos 2)1/41/41/41/40 (tok 3)0.25 (pos 3)
Figure 1: NoPE Theorem 1 uniform lower-triangular attention multiplying v₀=1 into reciprocal position stamps.

A frequent design question follows immediately: does NoPE require explicit decay? Comparing the four attention topologies clarifies the exact boundary:

Attention VariantMasking & PositionDecay Needed?Practical Role & Behavior
Pure Causal NoPELower-triangular causal maskNo (optional)Recovers order via $1/(i+1)$ averaging; slower local convergence
Local RoPE SWA + Global NoPESliding window + global causalZero decaySmolLM3 3:1 / Llama 4 iRoPE: local RoPE handles syntax, global NoPE stays unpenalized
Decay Linear + Global NoPEState decay + global causalDecay in linearKimi Linear 3:1 KDA + NoPE MLA: $\alpha_t$ prevents state cross-talk
Bidirectional NoPEUnmasked bidirectionalForbiddenCollapses into a permutation-equivariant set map regardless of decay

2. Causal Depthwise Short Convolutions#

Across Mamba, Qwen3-Next (GDN), Kimi Linear (KDA), Marin 535B, and DeepSeek Engram, lightweight Causal Depthwise Conv1D blocks (typically kernel width $k = 4$) handle short-range lexical coupling. Placement inside the block varies deliberately: Mamba and Qwen3-Next GDN insert Conv1D → SiLU directly after the linear projections on $Q, K, V$, whereas Marin 535B applies SConv(k=4) selectively to Keys ($W_K$), Attention output, and MoE output while omitting $W_V$ to avoid blurring value details. Controlled studies on horizontal Conv1D residual connections (Canon Layers, Zeyuan Allen-Zhu, 2025) further show that short local convolutions allow pure NoPE models to match RoPE syntax and narrow much of the gap between simpler GLA and GDN—while reiterating that fixed-state linear layers still hit a ceiling on exact single-hop retrieval at scale.

Original figure (Allen-Zhu, 2025, Fig. 6): Canon Layers inserting causal 1D convolution horizontal residual connections across Transformer sublayers A/B/C/D (arXiv:2512.17351).
Figure 2: Canon Layers inserting causal 1D convolution horizontal residual connections across Transformer sublayers A/B/C/D (arXiv:2512.17351). (Source: Allen-Zhu, 2025, Fig. 6)

Inspecting the diagram highlights three concrete details: on the right, points A / B / C / D mark the four sublayer insertion sites around Attention (A before QKV, B inside) and MLP (C before MLP, D inside) where horizontal causal links (shift=1, shift=2) blend neighboring tokens like a musical canon; on the left, the residual link $h' = h + \mathrm{causal\_conv1d}_w(h)$ is flagged in red for accelerating training, alongside the striking empirical finding at top-left that even random fixed weights $w_0, w_1, w_2, w_3 \in \mathbb{R}^m$ are already highly effective.

Terminology deserves precision here: Depthwise Conv1D applies one independent $k$-tap filter per channel costing only $k \cdot d$ parameters, whereas a full Depthwise Separable Conv1D (DSConv) follows that depthwise step with a $1\times 1$ pointwise linear mix costing $k \cdot d + d^2$. Comparing parameter budgets at $d=512, k=3$ makes the gap clear:

OperatorParameter FormulaParams at $d=512, k=3$Cross-Channel Mixing
Linear Projection$d^2$$262\text{K}$Full mixing at current step
Standard Dense 1D Conv$k \cdot d^2$$786\text{K}$Coupled across window & channels
Depthwise Conv1D$k \cdot d$$1.5\text{K}$Temporal window only, zero channel mixing
Depthwise Separable (DSConv)$k \cdot d + d^2$$264\text{K}$Depthwise window + $1\times 1$ pointwise mix

Why do standard dense and MoE LLMs keep SwiGLU FFNs rather than replacing them with DSConv? The $1\times 1$ pointwise mixing step duplicates channel work already done by $W_Q/W_K/W_V/W_O$ and SwiGLU, while depthwise conv itself has very low arithmetic intensity, stays HBM-bandwidth bound, and requires carrying a rolling k-1 conv cache per layer at inference time. Across $Q, K, V$ ablations, dropping the short conv on $K$ hurts most (explaining Marin 535B's choice to keep SConv on $W_K$ while skipping $W_V$). Even though its parameter footprint is tiny, launching bandwidth-bound short-conv kernels adds noticeable runtime overhead—prompting several newer state-space designs to explore removing standalone conv layers altogether.

Padding $k - 1$ zeros on the left preserves strict causality:

$$y_t = \sum_{j=0}^{k-1} w_j \odot x_{t-j}$$

Checking a single-channel trace with $k=4$, weights $w = [0.5, 0.3, 0.15, 0.05]$, and sequence $x = [2, 4, 6, 8]$: padding three left zeros yields $[0, 0, 0, 2, 4, 6, 8]$. Position $t=1$ reads only itself ($0.5 \times 2 = 1.0$), while $t=4$ folds the trailing four-token window into $0.5 \times 8 + 0.3 \times 6 + 0.15 \times 4 + 0.05 \times 2 = \mathbf{6.5}$, with $x_5$ strictly blocked by causality. This lightweight front-end absorbs fixed multi-word expressions and local syntax before global linear memory or NoPE attention engages.


3. From Memory Interference to Delta Rule and KDA#

Fixed-size linear state matrices $S_t \in \mathbb{R}^{d_v \times d_k}$ encode order naturally when multiplied by exponential decay $\alpha \in (0, 1)$ at each step: older tokens shrink by smaller powers $\alpha^t$, breaking permutation invariance immediately. Picture a fading blackboard at $\alpha = 0.8$: after writing "I" "love" "deep" "learning", step 4 retains $0.8^3 \text{I} + 0.8^2 \text{love} + 0.8^1 \text{deep} + 0.8^0 \text{learning} = 0.512\,\text{I} + 0.64\,\text{love} + 0.8\,\text{deep} + 1.0\,\text{learning}$, ensuring "cat bites dog" ($0.64\,\text{cat} + 0.8\,\text{bites} + 1.0\,\text{dog}$) and "dog bites cat" ($0.64\,\text{dog} + 0.8\,\text{bites} + 1.0\,\text{cat}$) produce distinct states even without RoPE.

Yet naive additive linear memory $S_t = S_{t-1} + v_t k_t^\top$ breaks down as soon as contexts lengthen. Assuming unit-norm keys ($\|k_j\|_2 = 1$), expanding any readout $S k_j$ isolates why:

$$S k_j = \sum_{i=1}^t v_i (k_i^\top k_j) = v_j + \underbrace{\sum_{i \neq j} (k_i^\top k_j)\, v_i}_{\text{cross-talk error}}$$

Zero cross-talk requires pairwise orthogonal keys, yet at most $d_k$ mutually orthogonal vectors exist in $\mathbb{R}^{d_k}$. Once sequence length exceeds head dimension ($t > 128$), new keys inevitably collide with stored entries and accumulate interference.

DeltaNet (Yang et al., 2024) (also see Songlin Yang's deltanet-1 and deltanet-2) frames each recurrence update as one step of online least-squares gradient descent on the instantaneous key-value error $\mathcal{L}_t(S) = \frac{1}{2}\|S k_t - v_t\|_2^2$:

$$\begin{aligned} \nabla_S \mathcal{L}_t(S_{t-1}) &= (S_{t-1} k_t - v_t) k_t^\top, \\ S_t &= S_{t-1}\big(I - \beta_t k_t k_t^\top\big) + \beta_t v_t k_t^\top \end{aligned}$$

Here $(I - \beta_t k_t k_t^\top)$ acts as a rank-1 projection that erases stale associations aligned with $k_t$ before writing the updated target value. Gated DeltaNet (GDN) places a scalar decay factor $\alpha_t$ in front, while KDA (Kimi Delta Attention, Kimi Team, 2025) refines that scalar gate into a channel-wise decay vector $\alpha_t \in (0, 1)^{d_k}$; both normalize $q_t$ and $k_t$ to unit $L_2$ norm and pass the state readout through RMSNorm and a multiplicative output gate $g_t$:

$$\begin{aligned} S_t &= S_{t-1}\,\mathrm{Diag}(\alpha_t)\big(I - \beta_t k_t k_t^\top\big) + \beta_t v_t k_t^\top, \\ q_t &= \frac{W_Q x_t}{\|W_Q x_t\|_2},\quad k_t = \frac{W_K x_t}{\|W_K x_t\|_2},\quad y_t = \big(g_t \odot \mathrm{RMSNorm}(S_t q_t)\big) W_O \end{aligned}$$

Original figure (Yang et al., 2024, Fig. 1): Gated DeltaNet hybrid layer schedules and gated delta-rule block design with short conv and L2 normalization (arXiv:2412.06464).
Figure 3: Gated DeltaNet hybrid layer schedules and gated delta-rule block design with short conv and L2 normalization (arXiv:2412.06464). (Source: Yang et al., 2024, Fig. 1)

A 500-token dual-channel scenario makes the multi-timescale benefit concrete: let channel 1 learn fast decay $\alpha_1 = 0.5$ and channel 2 learn slow retention $\alpha_2 = 0.999$. Across 500 tokens, local syntax noise in channel 1 vanishes ($0.5^{500} \approx 0$, cleared within ~10 steps), whereas a core entity written into channel 2 retains $0.999^{500} \approx \mathbf{0.61}$ (61% of its signal)—bridging the span until a periodic Layer-4 NoPE MLA layer (in a 3:1 KDA + NoPE MLA stack) performs exact global retrieval.

Original figure (Kimi Team, 2025, Fig. 3): Kimi Linear hybrid MoE architecture interleaving KDA and MLA layers alongside the internal KDA block (arXiv:2510.26692).
Figure 4: Kimi Linear hybrid MoE architecture interleaving KDA and MLA layers alongside the internal KDA block (arXiv:2510.26692). (Source: Kimi Team, 2025, Fig. 3)

Comparing the two block diagrams side by side exposes the exact architectural differences between GDN and KDA:

Intuition

Intuition: How KDA Chooses and Updates $k_t$ In practice, $k_t = W_K x_t / \|W_K x_t\|_2$ is not pinned to fixed coordinate axes; it performs learned oblique addressing across the unit sphere in $\mathbb{R}^{d_k}$, erasing only the component collinear with $k_t$. Keep the two time axes distinct: during inference, weights $W_K, W_V, W_Q$ are frozen and only the fast state $S_t$ updates token-by-token via the delta rule; during training, backpropagation updates $W_K, W_V, W_Q$ and the $\alpha_t, \beta_t$ projections across optimization steps.

Unit-normalizing $k_t$ ($\|k_t\|_2 = 1$) also governs the spectrum of $H_t = I - \beta_t k_t k_t^\top$: vectors orthogonal to $k_t$ have eigenvalue $+1$, while $k_t$ itself has eigenvalue $1 - \beta_t$. For $\beta_t \in (0, 1]$, $1 - \beta_t \in [0, 1)$ gives pure contraction; for $\beta_t \in (1, 2]$, the eigenvalue turns negative, reaching $-1$ at $\beta_t = 2$ where $I - 2 k_t k_t^\top$ is an exact Householder reflection. As analyzed in DeltaProduct (Siems et al., 2025), negative eigenvalues allow state transitions to execute sign flips and permutations needed for state tracking beyond $\mathrm{TC}^0$ decay. The engineering caveat is twofold: if erase and write vectors are decoupled into $(I - w_t k_t^\top)$ without norm alignment—or accumulated carelessly in bf16—operator norms can exceed $1$ and blow up exponentially to NaN; meanwhile, in hybrid models with frequent full-attention layers, allowing $\beta_t \in (1, 2]$ sometimes yields little empirical change on standard LM perplexity outside dedicated state-tracking benchmarks.

Calculation

Worked 2×2 Trace: Store 10 ("Beijing") along column 1 ($k_{\text{loc}}=[1,0]^\top$) and 8 ("Doctor") along column 2 ($k_{\text{job}}=[0,1]^\top$), giving $S_0 = \mathrm{diag}(10, 8)$. An update rewriting location to "Shanghai" arrives with $\alpha_t = [0.5, 0.9]^\top$, $k_t = [1,0]^\top$, $v_t = [2, 6]^\top$, and $\beta_t = 1$:

  1. Channel decay: $S' = S_0\,\mathrm{Diag}(\alpha_t) = \mathrm{diag}(5.0,\; 7.2)$.
  2. Rank-1 erase along $k_t$: $S'(I - k_t k_t^\top) = \mathrm{diag}(0,\; 7.2)$, clearing "Beijing" completely while preserving "Doctor 7.2".
  3. Outer-product write: $S_1 = \mathrm{diag}(0, 7.2) + v_t k_t^\top = \begin{pmatrix}2 & 0\\6 & 7.2\end{pmatrix}$. Querying $q = [1, 0]^\top$ reads $[2, 6]^\top$ without cross-talk, and querying $q = [0, 1]^\top$ returns $[0, 7.2]^\top$.
KDA (2×2 Worked Example): Channel Decay → Rank-1 Erase → Outer-Product Write Initial State S₀ [[10, 0], [0, 8]] Beijing 10 · Doctor 8 ① Decay Diag(αₜ) [[5, 0], [0, 7.2]] α = [0.5, 0.9]ᵀ ② Erase (I − β kₜkₜᵀ) [[0, 0], [0, 7.2]] Zeroes col 1 cleanly ③ Write +β vₜkₜᵀ [[2, 0], [6, 7.2]] Shanghai [2,6]ᵀ, Doc 7.2 Readout o₁ = S₁q Loc:[2,6]ᵀ · Job:[0,7.2]ᵀ
Figure 5: Channel decay, rank-1 erase, and outer-product update on a 2×2 KDA state matrix (adapted from Songlin Yang's deltanet-1/2 and Kimi KDA).

4. When Linear State Beats KV Cache—and Production Tradeoffs#

Fixed $d_k \times d_v$ recurrent state offers $O(1)$ per-step memory during decoding, yet it is not smaller than KV Cache at short contexts. At matched dtype with $d_k = d_v = 128$, one state matrix holds $128^2 = 16{,}384$ scalars, whereas caching $(K, V)$ costs $2 \times 128 = 256$ scalars per token. Linear state saves memory past $N > 64$ tokens against full MHA, yet against 8:1 GQA (where 8 query heads share one KV entry) the matched-dtype crossover shifts to $N > 512$ tokens. Factoring in actual serving precision—where linear state $S_t$ stays in fp32 (4 B) while KV cache runs in bf16 (2 B)—the real byte-for-byte breakeven doubles to $N > 128$ (MHA) and $N > 1{,}024$ (8:1 GQA).

Sequence MixerOrderingMemory / Decode IOOverwrite & Kernel Profile
Softmax Full AttnRoPE or NoPE$O(N)$ growing cacheExact lookup; fast FlashAttention, HBM-bound Decode
Additive Linear AttnDecay / pos map$O(d_k d_v)$ constantRapid cross-talk collapse once $N > d_k$
GLA / Mamba-2Diagonal decay$O(d_k d_v)$ constantSmooth forgetting; lacks selective rank-1 overwrite
GDN / KDAChannel + rank-1$O(d_k d_v)$ · < 8:1 GQA past 512Selective overwrite; requires chunkwise WY & fp32 math

Even past those crossover lengths, deploying delta-rule linear layers in large decoders encounters three core algorithmic and numerical constraints:

  1. Fixed-state ceiling & hybrid ratios: Substituting (H, d_k, d_v, dtype) clarifies the memory scale—in a 1.4B-scale GDN layer with $H = 8$ heads and $d_k = d_v = 128$ in bf16 (2 B), the state matrix alone takes $8 \times 128 \times 128 \times 2 = 256\text{ KiB}$ ($\approx 300\text{ KB}$ including $k-1=3$ rolling Conv1D buffers, or $512\text{ KiB}$ in fp32) versus hundreds of MB for 128K full KV caches. Still, finite capacity requires periodic full NoPE MLA layers—as in Kimi Linear's 3:1 KDA + NoPE MLA schedule.
  2. Non-diagonal transitions & Chunkwise WY: Because DeltaNet transitions $(I - \beta_t k_t k_t^\top)$ are non-diagonal $d\times d$ matrices that do not commute across steps, standard parallel prefix scans degrade to $O(L d^3)$. Hardware kernels (see Flash Linear Attention) factor each length-$C$ chunk (stacking row vectors $Q, K \in \mathbb{R}^{C \times d_k}$ and $V \in \mathbb{R}^{C \times d_v}$) into its Chunkwise WY representation, solving one $C \times C$ unit lower-triangular system $T$ while absorbing cumulative channel decay $\Gamma_t = \exp(\sum_{j \le t} \log \alpha_j)$ so intra-chunk decay factors symmetrically as $(Q \odot \Gamma)(K / \Gamma)^\top$:

$$\begin{aligned} L &= \mathrm{strict\_tril}\!\big(\mathrm{diag}(\beta)(K \odot \Gamma)(K / \Gamma)^\top\big), \\ T &= (I + L)^{-1}\,\mathrm{diag}(\beta), \qquad W = T(K \odot \Gamma), \qquad U = T V, \\ O_{\text{intra}} &= (Q \odot \Gamma) S_0^\top + \Big(\big((Q \odot \Gamma)(K / \Gamma)^\top\big) \odot M_{\text{causal}}\Big)\big(U - W S_0^\top\big), \\ S_C &= \Big(S_0\big(I - W^\top(K/\Gamma)\big) + U^\top(K/\Gamma)\Big)\mathrm{Diag}(\Gamma_C) \end{aligned}$$

turning intra-chunk updates into dense Tensor Core matmuls and explaining where the K / Γ division originates.

  1. Accumulated rounding drift: Numerical drift goes beyond bf16: production context-parallel KDA deployments discovered that even TF32 rounding compounds across chained state merges (resolved upstream in FLA PR #1180), necessitating strict fp32 state accumulation.
Caveat

Caveat: Intra-Chunk K / Γ Overflow and the safe gate Floor Inside the $(Q \odot \Gamma)(K / \Gamma)^\top$ factorization, dividing keys by $\Gamma_t = \exp(\sum_{j \le t} \log \alpha_j)$ (K / Γ) risks explosive overflow if $\log \alpha_j$ turns too negative and pushes $\Gamma \to 0$. Production kernels therefore enforce a safe gate floor ($\log \alpha_t \ge -5$) alongside a short chunk = 16 size: worst-case amplification is bounded at $1 / e^{-5 \times 16} = e^{80} \approx \mathbf{5.5 \times 10^{34}}$, fitting inside fp32 and bf16 limits ($\approx 3.4 \times 10^{38}$, since both share an 8-bit exponent)—yet severely overflowing fp16 (max finite value $65{,}504 \approx e^{11.09}$). Doubling chunk size to 32 without subchunk re-anchoring hits $e^{160}$ and immediately overflows to NaN even in fp32.

KDA Chunkwise WY Factorization: C×C Solve T → Tensor-Core GEMM → Inter-Chunk State S_C 1. Chunk C=16 Prep Γ=∏α, K_Γ=K⊙Γ, K/Γ 2. Triangular Solve T = (I+L)⁻¹ diag(β) 3. Intra-Chunk GEMM W=TK_Γ, U=TV → O_intra 4. Next Chunk State S(I−WᵀK/Γ)+UᵀK/Γ Turns non-commutative O(Ld³) recurrence into Tensor-Core GEMMs (safe gate log α ≥ −5 bounds exp(80) for bf16/fp32)
Figure 6: KDA Chunkwise WY dataflow: C×C lower-triangular solve, Tensor-Core intra-chunk GEMM, and inter-chunk state pass.

The self-contained PyTorch script below verifies both claims: step-by-step channel-gated KDA recurrence matches the Chunkwise WY + $(Q \odot \Gamma)(K / \Gamma)^\top$ block formula to within 1e-5 on $C=16$ chunks, and prints exp(80) against precision bounds:

PYTHON
import math, torch
import torch.nn.functional as F

torch.manual_seed(0)
C, dk, dv = 16, 4, 4
K = F.normalize(torch.randn(C, dk), dim=-1)
Q, V = torch.randn(C, dk), torch.randn(C, dv)
a = torch.rand(C, dk) * 0.4 + 0.5
b = torch.rand(C) * 0.8 + 0.1
S0 = torch.randn(dv, dk)
S, O_step = S0.clone(), []
for t in range(C):
    S = S * a[t][None, :]
    S = S - b[t] * (S @ K[t])[:, None] * K[t][None, :]
    S = S + b[t] * V[t][:, None] * K[t][None, :]
    O_step.append(S @ Q[t])
G = torch.cumprod(a, dim=0)
Kg, Kd, Qg = K * G, K / G, Q * G
L = torch.tril(Kg @ Kd.T, diagonal=-1) * b[:, None]
T = torch.linalg.solve(torch.eye(C) + L, torch.diag(b))
W, U = T @ Kg, T @ V
O_wy = Qg @ S0.T + torch.tril(Qg @ Kd.T) @ (U - W @ S0.T)
S_wy = (S0 @ (torch.eye(dk) - W.T @ Kd) + U.T @ Kd) * G[-1]
assert torch.allclose(torch.stack(O_step), O_wy, atol=1e-5)
assert torch.allclose(S, S_wy, atol=1e-5)
print("O/S diff OK; exp(80):", f"{math.exp(80):.2e}")

Finally, moving linear attention into high-concurrency serving and RL introduces four production tradeoffs. For prefix caching at $H = 32, d_k = d_v = 128$ in fp32, one KDA layer holds $2\text{ MiB}$, so 69 KDA layers consume 138 MiB per state snapshot; paired with 24 full-attention layers (12–27 KiB/tok), one checkpoint equals ~5K–18K tokens of full-attention KV:

Production AxisFull Attention BaselineLinear / Hybrid Serving Pitfall & Mitigation
Low-Bit QuantizationTolerates fp8 KV Cache wellRecurrent $S_t$ drifts or collapses in bf16; typically requires fp32 state (or careful bf16 + NoPE tuning)
Prefix Cache GranularityPagedAttention shares 16-token pagesState reuse aligns to full-stack checkpoints; across e.g. 69 KDA ($138\text{ MiB}$+) + 24 full layers, one checkpoint rivals ~18K tokens of full-attn KV
Speculative RollbackTruncate tail KV pointers freelyDraft rejection cannot undo overwrites to $S_t$; ReplaySSM (arXiv:2610.13778) caches checkpoints + input buffer so rollback only shifts a pointer
On-Policy RL & LoopsSingle-kernel attention parityChunkwise prefill vs. recurrent decode kernels differ in finite precision, amplifying RL mismatch; pure NoPE/linear models also risk rare endless-repetition loops, nudging frontier hybrids toward Linear + Sparse Attention

Across all of these constraints, purely linear recurrences are unlikely to displace Softmax attention alone: the sweet spot is a 3:1 or 5:1 KDA/GDN + periodic NoPE MLA hybrid where linear layers slash long-context prefill cost while full NoPE layers protect verbatim retrieval, provided prefix caching and fp32 state checkpoints are engineered cleanly.


5. Further Reading#


References#

  1. Daniel Y. Fu, Tri Dao et al. (2022). Hungry Hungry Hippos: Towards Language Modeling with State Space Models (H3). arXiv:2212.14052
  2. Michael Poli, Stefano Massaroli, Tri Dao et al. (2023). Hyena Hierarchy: Towards Larger Convolutional Language Models. arXiv:2302.10866
  3. Amirhossein Kazemnejad et al. (2023). The Impact of Positional Encoding on Length Generalization in Transformers (NoPE Theorem 1). arXiv:2305.19466
  4. Albert Gu & Tri Dao (2023). Mamba: Linear-Time Sequence Modeling with Selective State Spaces. arXiv:2312.00752
  5. Songlin Yang, Bailin Wang, Yikang Shen et al. (2023). Gated Linear Attention Transformers with Hardware-Efficient Training (GLA). arXiv:2312.06635
  6. Tri Dao & Albert Gu (2024). Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality (Mamba-2). arXiv:2405.21060
  7. Songlin Yang et al. (2024). Parallelizing Linear Transformers with the Delta Rule over Sequence Length (DeltaNet & WY). arXiv:2406.06484 · Blog: deltanet-1 / deltanet-2
  8. Songlin Yang, Jan Kautz, Ali Hatamizadeh (2024). Gated Delta Networks: Improving Mamba2 with Delta Rule (GDN). arXiv:2412.06464
  9. Bowen Yang et al. (2025). Rope to Nope and Back Again: A New Hybrid Attention Strategy (RNoPE-SWA). arXiv:2501.18795
  10. Julien Siems et al. (2025). DeltaProduct: Improving State-Tracking in Linear RNNs via Householder Products. arXiv:2502.10297
  11. HuggingFaceTB (2025). SmolLM3 & Smol Training Playbook (3:1 RNoPE-SWA). SmolLM3 Blog / Playbook
  12. Meta AI (2025). The Llama 4 Herd (iRoPE). Meta Blog · Entropy scaling: Su 8823
  13. Qwen Team (2025). Qwen3-Next: Towards Ultimate Training & Inference Efficiency (GDN + Gated Attention). Qwen Blog
  14. Marin Team / OpenAthena (2025). Marin 535B Architecture. OpenAthena Blog
  15. Kimi Team (2025). Kimi Linear: An Expressive, Efficient Attention Architecture (KDA). arXiv:2510.26692
  16. Sakana AI (2025). DroPE: Extending the Context of Pretrained LLMs by Dropping Their Positional Embeddings. arXiv:2512.12167
  17. Zeyuan Allen-Zhu (2025). Physics of Language Models: Part 4.1, Architecture Design and the Magic of Canon Layers. arXiv:2512.17351
  18. Mamba-3 Authors (2025). Mamba-3: Improved Sequence Modeling using State Space Principles. OpenReview:HwCvaJOiCj
  19. DeepSeek-AI & Peking University (2026). Conditional Memory via Scalable Lookup: A New Axis of Sparsity for Large Language Models (Engram). arXiv:2601.07372
  20. Meta FAIR (2026). Sparse Delta Memory. arXiv:2607.07386
  21. Arshia Afzal et al. (2026). Raven: High-Recall Sequence Modeling with Sparse Memory Routing. arXiv:2607.25357
  22. Ze-Wei Liou, Harris Nover, Amey Naik (2026). ReplaySSM: Cache SSM Inputs, Not State. arXiv:2610.13778
  23. Flash Linear Attention (fla-org) — Repository & PR #1180
Cite this note
@misc{liu2026beyondropenopeconv,
  title  = {{What Replaces RoPE? Implicit Position in NoPE, Short Conv, and KDA}},
  author = {Feiyang Liu},
  year   = {2026},
  month  = {nov},
  url    = {https://zaychikliu.github.io/blog/2026/beyond-rope-nope-conv-kda/}
}