Manuscript Offprint
arXiv:2611.07552SPARE: Fast Linear Attention Decoding with Compact Recurrent States
Abstract
Linear attention reduces the quadratic sequence-length complexity of softmax attention by maintaining fixed-size recurrent states. However, these states scale quadratically with the representation dimension and require repeated data transfers during decoding, creating a substantial GPU memory bottleneck. Recent studies have revealed significant low-rank redundancy in recurrent states, suggesting opportunities for more efficient representations. We introduce SPARE (State Projection for Accelerated Recurrent Execution), a training-free method that exploits this redundancy through fixed low-dimensional subspaces, heterogeneous rank allocation, and lightweight write compensation. By performing recurrent reads and updates directly on compact states, SPARE reduces memory traffic without online decomposition or dense-state reconstruction. SPARE achieves 2.55× full-model decoding speedup, 7.49× lower recurrent-kernel DRAM traffic, and 3.31× lower peak GPU memory, while preserving better associative-retrieval accuracy than structured pruning at matched memory budgets.
1 Introduction
Linear attention (Katharopoulos et al., 2020; Yang et al., 2023) has emerged as an efficient alternative to conventional softmax attention (Vaswani et al., 2017) for long-sequence modeling. By reformulating attention computation as recurrent state updates (Dao and Gu, 2024), linear attention summarizes historical information into fixed-size states without maintaining a growing key-value cache. However, eliminating the dependence on sequence length does not eliminate the cost of recurrent memory itself. At each decoding step, linear attention must repeatedly read and update a potentially large recurrent state matrix, requiring substantial data transfers between GPU high-bandwidth memory (HBM) and computing units (Gupta et al., 2026). These operations primarily involve matrix-vector multiplications (GEMV) and rank-one updates, which require relatively little computation compared to the amount of data transferred (Yin et al., 2014; Williams et al., 2009). Consequently, recurrent-state memory traffic can become a dominant efficiency bottleneck during decoding, particularly at high concurrency.
Reducing recurrent-state memory traffic therefore presents a promising opportunity to accelerate linear attention decoding. Prior studies have identified substantial low-rank structure in recurrent states (Nazari and Rusch, 2026), with effective ranks varying considerably across layers and heads (Sun et al., 2026), which is illustrated in Figure 1a. A natural approach is to reduce state dimensions through structured pruning of key and query channels (Nazari and Rusch, 2026). However, low-rank structure does not necessarily imply that important information is concentrated in a small subset of the original representation dimensions. Consequently, aggressive pruning may discard information essential to the model's associative memory. Projection onto a low-dimensional subspace avoids this restriction, but allocating the same rank to every head may overlook their heterogeneous memory requirements. Thus, exploiting recurrent-state redundancy requires careful consideration of both the representation subspace and the allocation of limited state capacity.
A further challenge arises from the dynamic nature of recurrent memory. Unlike static matrix compression, a compressed recurrent state must support successive associative reads and writes, rather than merely approximate a single state matrix. Projecting keys can alter their geometry and reduce their norms, potentially changing the effectiveness of subsequent memory updates. This raises a fundamental question: can we exploit the heterogeneous low-rank structure of recurrent states to reduce decoding costs while preserving their functional ca-

(a) Heterogeneous effective ranks

(b) Recurrent updates in a fixed subspace
Figure 1: Motivation and intuition of SPARE. (a) Heterogeneous low-rank recurrent states. The histograms show the distributions of effective ranks across 192 attention heads on natural text (top) and associative retrieval (bottom). For each head, we report the median across sampled recurrent states, where denotes the minimum rank retaining 95% of the state's squared singular-value energy. Despite the original state dimension of , effective ranks are typically much smaller and vary substantially across heads. (b) Recurrent updates in a fixed subspace. SPARE represents the recurrent state as , where the projection basis remains fixed while the compact coefficient matrix evolves across decoding steps. This allows recurrent reads and updates to operate directly on compact states of size , rather than the original matrices, without reconstructing the dense state.
pabilities? In particular, can recurrent reads and updates be performed directly in a compact low-dimensional subspace without excessive information loss?
To address these challenges, we introduce SPARE (State Projection for Accelerated Recurrent Execution), a training-free method for accelerating linear attention decoding with compact recurrent states. Instead of discarding selected representation dimensions, as shown in Figure 1b, SPARE maintains recurrent states in fixed low-dimensional key subspaces, where memory reads and updates can be performed directly. To accommodate heterogeneous memory requirements, SPARE allocates different rank budgets across layers and heads based on their recurrent-state spectral characteristics. A lightweight write-compensation mechanism further mitigates the loss of memory-writing effectiveness caused by key projection. Finally, a packed GPU implementation enables efficient recurrent computation on the compressed states without online matrix decomposition or dense-state reconstruction.
We evaluate SPARE on Gated DeltaNet (Yang
et al., 2025), examining both model quality under recurrent-state compression and actual GPU decoding efficiency. Our results demonstrate substantial reductions in recurrent-state memory traffic and full-model decoding latency, together with better retrieval performance than structured pruning under matched memory budgets. These benefits involve a task-dependent quality–efficiency trade-off rather than lossless compression. In summary, our contributions are:
-
We characterize the heterogeneous low-rank structure of linear attention's recurrent states and highlight the limitations of coordinate pruning and uniform capacity allocation for compressing associative memory.
-
We propose SPARE, a training-free framework that combines fixed low-dimensional state representations, heterogeneous rank allocation, and lightweight write compensation to enable efficient recurrent reads and updates.
-
We demonstrate full-model decoding speedup, lower recurrent-kernel
DRAM traffic, and lower peak GPU memory, while achieving substantially better retrieval accuracy than structured pruning at matched memory budgets.
2.1 Gated Linear Attention
We consider Gated DeltaNet (Yang et al., 2025), a representative architecture of gated linear attention. For each attention head, historical information is maintained in a recurrent state , where and denote the key and value dimensions, respectively. At each token position , the key , query , and value are used to update and read the recurrent state:
(1)
where controls state decay and determines the strength of the memory update. The term represents the previously stored value associated with the current key. Unlike conventional attention, the recurrent state has a fixed size of independent of the sequence length, but must be accessed and updated at every decoding step.
2.2 Recurrent-State Redundancy
Although the recurrent state contains elements, its effective dimensionality can be substantially smaller. Let denote its singular values, where . We define the effective rank required to retain a fraction of the state's spectral energy as
Prior studies have observed substantial low-rank structure in recurrent states (Nazari and Rusch, 2026), with effective ranks varying considerably across layers and heads (Sun et al., 2026). This suggests that allocating the same state capacity to every head may be inefficient. However, a low effective rank does not guarantee that the informative subspace aligns with the original representation dimensions or remains fixed over time. Exploiting this redundancy therefore requires a compact representation that supports efficient recurrent computation while preserving functionally important information.
3 SPARE: Compact Recurrent States
3.1 Fixed Low-Rank Representation
Motivated by the low-rank structure of recurrent memory, SPARE compresses the key dimension while preserving the full value dimension. For clarity, we omit layer and head indices and consider a fixed orthonormal basis , where and . Instead of maintaining the original recurrent state , SPARE represents it using a compact coefficient matrix :
By projecting keys and queries into the fixed subspace,
the recurrent output can be computed directly as
without reconstructing the original dense state. This representation reduces the recurrent-state storage from to while allowing the value-side representation to evolve with the input. The fixed basis and rank are determined separately for each head, as described in the following subsection.
3.2 Heterogeneous Rank Allocation
Since recurrent states exhibit different degrees of redundancy across layers and heads, SPARE assigns heterogeneous rank budgets using offline calibration. For each layer and head h, we estimate the normalized spectral contribution of the j-th singular direction as
where denotes the -th largest singular value of the recurrent state. Given a total rank budget , we greedily allocate additional dimensions to heads with the largest remaining spectral contributions, subject to predefined rank bounds and . We then construct a fixed key subspace for each head using principal component analysis (PCA) on normalized calibration keys. Specifically, we compute the uncentered second-moment matrix
(7) where the calibration keys are collected after the original convolution and key normalization. The projection basis consists of the leading eigenvectors of and remains fixed throughout inference. This offline procedure adapts the state capacity to individual heads without introducing additional decomposition costs during decoding.
The choice of key PCA is motivated by the structure of the Gated Delta Rule. Starting from a zero initial state, each recurrent update adds a rank-one term whose right factor is the current key, implying that the row space of lies within the span of historical keys. Consequently, principal components of calibration keys provide a natural and inexpensive approximation to the directions supporting recurrent memory. However, the dominant singular directions of the recurrent state also depend on values, gating, and interactions among historical updates, and need not coincide with those of the key covariance. We therefore use the state spectrum to estimate the relative capacity requirements of different heads, while employing key PCA to construct their fixed projection bases. This separation provides a practical approximation rather than an optimality guarantee.
3.3 Compact Recurrent Updates
With the fixed projection basis , SPARE performs recurrent updates directly on the compact coefficient matrix . The original old-value prediction is approximated by , allowing the Gated Delta Rule to operate in the reduced-dimensional space. However, projecting the key generally reduces its norm, which can weaken the effective strength of memory writes. To mitigate this effect, SPARE introduces a bounded write-compensation factor:
(8)
where ensures numerical stability and limits excessive amplification. The compact recurrent state is then updated as
This compensated update mitigates the loss of write strength caused by key projection while preserving the original value dimension. Together with the compact read operation in Eq. (5), SPARE performs recurrent computation without reconstructing the dense state or maintaining the projection basis online.
3.4 Theoretical Properties
The write-compensation mechanism admits a simple interpretation in terms of effective memory-writing strength. Multiplying Eq. (9) by the projected key gives
Without compensation, the effective write strength is reduced from to . When neither the numerical floor nor the compensation cap is active, , restoring the original write strength along the projected key direction. Furthermore, SPARE preserves the original recurrent dynamics exactly when the keys remain within the fixed subspace, as established by the following theorem.
Theorem 1 (Exactness under Subspace Invariance). Let be a fixed orthonormal basis, and suppose . If and for every , with and , then the original and compact recurrent updates satisfy
for all t, under identical input and gating sequences.
The theorem establishes that SPARE introduces no approximation error when the fixed subspace fully captures the key directions. In practice, the subspace is approximate, and write compensation mitigates the resulting loss of effective write strength without guaranteeing exact recovery. The complete proof is provided in Appendix A.1.
3.5 Efficient Decoding
To translate state compression into decoding acceleration, SPARE packs the head-specific coefficient matrices into a contiguous GPU buffer without padding them to a uniform rank. Each head accesses its compact state through fixed offsets, enabling recurrent reads and updates directly on the compressed representation. For a head with rank , the recurrent-state read/write volume scales from to , yielding a nominal reduction factor of before projection and auxiliary overheads. We implement these operations using GPU kernels and maintain addressable states to support CUDA Graph execution across decoding steps. The fixed projection bases are shared across requests, while the original convolution states are preserved. Further implementation details are provided in Appendix B.
4 Experiments
4.1 Experimental Setup
Model. We evaluate SPARE on a pretrained 1.3B-parameter pure Gated DeltaNet (GDN) (Yang et al., 2025), comprising 24 layers with eight heads per layer and . Model weights use BF16, while recurrent states are maintained in FP32. All compression configurations are training-free and use offline calibration.
Baselines. We compare SPARE against the original uncompressed model (Dense), structured key/query channel pruning (DRRQR) (Nazari and Rusch, 2026), and fixed-subspace compression with uniform head ranks (Uniform). Comparisons use matched recurrent-state memory budgets without recovery fine-tuning.
Evaluation Tasks. We evaluate language modeling using next-token NLL on WikiText-103 and associative memory using 512 four-choice retrieval prompts. For downstream evaluation, we report results on three in-context retrieval tasks: SQuAD Completion, TriviaQA, and DROP.
System Evaluation. We benchmark on NVIDIA RTX A6000 GPUs (48 GB), measuring full-model decoding latency, recurrent-kernel DRAM traffic, and peak GPU memory. All decoding comparisons use stateful CUDA Graph execution with matched workloads and same-device baselines.
4.2 Task-dependent Performance
Table 1 compares SPARE with DRRQR at matched recurrent-state budgets of 6 and 12 MiB across language modeling, associative retrieval, and downstream tasks. At both budgets, SPARE achieves lower language modeling NLL and substantially higher associative retrieval accuracy, reaching 60.35% compared with 33.20% for DRRQR at 12 MiB. SPARE also achieves higher average accuracy across the three downstream tasks, although DRRQR-K64 slightly outperforms SPARE-H64 on TriviaQA. Nevertheless, both compressed methods exhibit quality degradation relative to Dense, with varying sensitivity across tasks. Overall, these results highlight the advantages of compact recurrent subspaces for preserving associative retrieval performance, while revealing the task-dependent limitations of state compression.
4.3 Quality under State Compression
Figure 2 examines the trade-off between model quality and measured peak GPU memory across language modeling, associative retrieval, and downstream tasks. At comparable memory footprints, SPARE generally achieves better quality retention than DRRQR, with particularly pronounced advantages in associative retrieval. As the compression budget increases, SPARE progressively reduces language modeling NLL, while retrieval and downstream performance exhibit diminishing returns. Although DRRQR-K128 achieves slightly better quality on some metrics than SPARE-H96, it requires substantially more GPU memory. Overall, these results demonstrate that compact recurrent subspaces provide a favorable quality–memory trade-off across different compression budgets.
4.4 Decoding Efficiency
Figure 3 evaluates the decoding efficiency of SPARE across different batch sizes, reporting full-model decoding speedup, recurrent-kernel DRAM traffic reduction, and peak GPU memory reduction relative to Dense. As batch size increases, the decoding benefits of compact recurrent states become more pronounced. At batch size 512, SPARE-H32 achieves a full-model decoding speedup, while reducing recurrent-kernel DRAM traffic by and peak GPU memory by . The higher-capacity SPARE-H64 retains a decoding speedup and a reduction in peak GPU memory at the same batch size. The gap between recurrent-kernel traffic reduction and full-model speedup reflects the remaining costs of projection and other model operations. Overall, these results demonstrate that performing recurrent reads and updates directly in compact subspaces translates substantial memory savings into practical decoding acceleration.
4.5 Ablation Studies and Analysis
Heterogeneous Rank Allocation. We compare heterogeneous and uniform rank allocations under identical state budgets. As shown in Figure 4(a) and Table 2, heterogeneous allocation improves associative retrieval accuracy by 14.26–23.24 percentage
Table 1: Task-dependent performance under recurrent-state compression. We compare SPARE with DRRQR at matched recurrent-state budgets of 6 and 12 MiB, using the uncompressed Dense model as a reference. Language modeling is evaluated using next-token NLL on WikiText-103 (lower is better). Associative retrieval accuracy is measured over 512 synthetic four-choice prompts (higher is better). Downstream results report accuracy (%) on SQuAD Completion, TriviaQA, and DROP, with Avg. denoting their unweighted mean. State denotes persistent recurrent-state storage per request, excluding model weights and other runtime memory. Bold values indicate the better result within each matched-budget comparison.
| Method | State (MiB) | Language Modeling | Associative Retrieval | Downstream Tasks | |||
|---|---|---|---|---|---|---|---|
| NLL ↓ | Acc. (%) ↑ | SQuAD | TriviaQA | DROP | Avg. | ||
| Dense | 48 | 2.290 | 70.51 | 36.92 | 64.28 | 21.85 | 41.02 |
| DRRQR-K32 | 6 | 3.068 | 23.44 | 9.91 | 32.29 | 8.15 | 16.78 |
| SPARE-H32 | 6 | 2.817 | 56.84 | 28.62 | 37.68 | 12.75 | 26.35 |
| DRRQR-K64 | 12 | 2.653 | 33.20 | 21.90 | 50.12 | 15.09 | 29.04 |
| SPARE-H64 | 12 | 2.534 | 60.35 | 30.74 | 48.40 | 18.11 | 32.42 |

(c) Selected downstream tasks
Figure 2: Quality–memory trade-off of recurrent-state compression. We compare SPARE with DRRQR structured pruning across different compression budgets. (a) Next-token NLL on WikiText-103 (lower is better). (b) Associative retrieval accuracy over 512 four-choice prompts (higher is better). (c) Mean accuracy across three selected downstream tasks: SQuAD Completion, TriviaQA, and DROP (higher is better). Peak GPU memory is measured during full-model inference with batch size 512, a prefill length of 128 tokens, and 64 decoding steps. Across these evaluations, SPARE provides a favorable quality–memory trade-off, particularly under aggressive compression.
points across the evaluated budgets. However, uniform allocation achieves slightly lower language modeling NLL at smaller budgets, indicating that the benefits of heterogeneous allocation are task dependent.
Subspace Construction. Figure 4(b) compares Key-, State-, and Value-based projection subspaces under matched calibration and rank budgets. Key PCA yields the highest associative retrieval accuracy among the evaluated subspaces, while Value PCA performs worst under the matched budget. These results highlight the importance of subspace construction for preserving associative memory.
Write Compensation. Figure 4(c) shows that write compensation improves retrieval accuracy by 7.62 and 11.13 percentage points for SPARE-H32 and SPARE-H64, respectively.
5 Related Work
5.1 Linear Attention and Efficient Inference
Linear attention replaces the growing key-value cache of conventional attention with fixed-size recurrent states, enabling efficient autoregressive inference (Katharopoulos et al., 2020). Subsequent architectures improve the expressiveness of recurrent memory through gating and delta-rule updates, including Gated Linear Attention (Yang et al., 2023), Gated DeltaNet (Yang et al., 2025), Kimi Delta Attention (Team et al., 2025), and Gated DeltaNet-2 (Hatamizadeh et al., 2026). Meanwhile, hardware-efficient implementations such as FlashLinearAttention (Yang et al., 2023) and Lightning Attention-2 (Qin et al., 2024) accelerate lin-

(c) Peak GPU memory reduction

Figure 3: Decoding efficiency and memory savings of SPARE. We evaluate SPARE-H32 and SPARE-H64 against the Dense Gated DeltaNet baseline across batch sizes of 32, 128, and 512. (a) Full-model decoding speedup relative to Dense. (b) Reduction in recurrent-kernel DRAM traffic, measured using hardware counters and normalized by the corresponding Dense kernels. (c) Reduction in peak GPU memory, computed as the ratio of Dense to SPARE peak memory usage during full-model inference. Experiments are conducted on NVIDIA RTX A6000 GPUs using stateful CUDA Graph decoding. The results demonstrate that compact recurrent states reduce memory traffic and GPU memory requirements while accelerating full-model decoding.
Table 2: Effect of heterogeneous rank allocation. Uniform SPARE and SPARE are compared under identical recurrent-state budgets. NLL is measured on WikiText-103 (lower is better), and retrieval accuracy is evaluated on 512 four-choice prompts (higher is better). Bold values indicate the better result at each matched budget.
| Method | State (MiB) | NLL | Acc. (%) |
|---|---|---|---|
| Uniform32 | 6 | 2.798 | 33.59 |
| SPARE-H32 | 6 | 2.817 | 56.84 |
| Uniform48 | 9 | 2.658 | 40.63 |
| SPARE-H48 | 9 | 2.680 | 58.40 |
| Uniform64 | 12 | 2.574 | 46.09 |
| SPARE-H64 | 12 | 2.534 | 60.35 |
ear attention through tiled and parallel computation. Other approaches explore specialized hardware that keeps recurrent states on-chip to reduce memory transfers (Gupta et al., 2026). While these advances improve model architectures or execution efficiency, recurrent-state memory access remains a substantial cost during GPU decoding. SPARE addresses this bottleneck by reducing the amount of recurrent-state data transferred through compact state representations.
5.2 Recurrent-State Compression
Recent studies have identified substantial low-rank redundancy in linear attention's recurrent states, with effective ranks varying considerably across attention heads (Nazari and Rusch, 2026; Sun et al., 2026). To exploit this redundancy, Nazari and Rusch (2026) propose structured pruning of key and query channels, including a rank-revealing QR-based approach to state reduction. Similarly, Sun et al. (2026) investigate heterogeneous state-rank dynamics and introduce rank- and norm-aware pruning. Another direction reduces recurrent-state storage through quantization. For example, LeapQuant (Pan et al., 2026) combines window-based quantization with outlier compensation to mitigate quantization errors during recurrent inference. Unlike coordinate pruning, SPARE represents recurrent memory in fixed low-dimensional key subspaces without restricting it to selected original representation dimensions. Rather than reducing numerical precision, SPARE exploits heterogeneous low-rank structure to enable direct recurrent reads and updates on compact states, with lightweight compensation for reduced memory-writing strength.
6 Conclusion
We presented SPARE, a training-free framework for accelerating linear attention decoding through compact recurrent states. By combining heterogeneous rank allocation, fixed key-based subspaces, and lightweight write compensation, SPARE enables recurrent reads and updates directly in a reduced representation without online decomposition or dense-state reconstruction. On a 1.3B Gated DeltaNet model, SPARE achieves full-model decoding speedup, lower recurrent-kernel DRAM traffic, and lower peak GPU memory at batch


Figure 4: Ablation studies of the key design choices in SPARE. All panels report associative retrieval accuracy on 512 four-choice prompts, with 256 prompts each at retrieval depths of 64 and 128. (a) Heterogeneous rank allocation. We compare SPARE with Uniform SPARE at matched recurrent-state budgets of 6, 9, and 12 MiB. Both methods use the same Key-PCA basis construction and write-compensation mechanism, differing only in how ranks are distributed across layers and heads. Heterogeneous allocation consistently achieves higher retrieval accuracy. (b) Subspace construction. We compare Key-based, State-based, and Value-based PCA projections under a fixed 12 MiB state budget, matched calibration data, and identical per-head rank allocations. Key and State PCA use right-side projections, whereas Value PCA uses a left-side projection. Key-side write compensation is disabled for this comparison and is not applicable to the Value-side formulation. Key PCA achieves the highest retrieval accuracy among the evaluated subspaces. (c) Write compensation. We compare SPARE-H32 and SPARE-H64 with and without projected-Key write compensation, holding their respective rank allocations and projection bases fixed. Enabling compensation improves retrieval accuracy at both compression budgets. All state budgets refer to persistent recurrent-state storage per request rather than peak GPU memory.
size 512. It also preserves associative retrieval accuracy more effectively than structured coordinate pruning at matched state budgets, although compression introduces task-dependent quality degradation. These results demonstrate the potential of compact recurrent computation for efficient linear attention inference.
References
Tri Dao and Albert Gu. 2024. Transformers are ssms: Generalized models and efficient algorithms through structured state space duality. arXiv preprint arXiv:2405.21060.
Neelesh Gupta, Peter Wang, Rajgopal Kannan, and Viktor K Prasanna. 2026. A persistent-state dataflow accelerator for memory-bound linear attention decode on fpga. arXiv preprint arXiv:2603.05931.
Ali Hatamizadeh, Yejin Choi, and Jan Kautz. 2026. Gated deltanet-2: Decoupling erase and write in linear attention. arXiv preprint arXiv:2605.22791.
Angelos Katharopoulos, Apoorv Vyas, Nikolaos Papas, and François Fleuret. 2020. Transformers are rnn: Fast autoregressive transformers with linear attention. In International conference on machine learning, pages 5156–5165. PMLR.
Philipp Nazari and T Konstantin Rusch. 2026. The key to state reduction in linear attention: A rank-based perspective. arXiv preprint arXiv:2602.04852.
Yi Pan, Haocheng Xi, Kan Zhu, Xingyang Li, Yibo Wu, Mayank Mishra, Hongtao Zhang, William X Zheng, Baris Kasikci, Song Han, et al. 2026. Leapquant: Efficient linear attention with accurate recurrent state quantization. arXiv preprint arXiv:2609.38166.
Zhen Qin, Weigao Sun, Dong Li, Xuyang Shen, Weixuan Sun, and Yiran Zhong. 2024. Lightning attention-2: A free lunch for handling unlimited sequence lengths in large language models. arXiv preprint arXiv:2401.04658.
Ao Sun, Hongtao Zhang, Heng Zhou, Yixuan Ma, Yiran Qin, Tongrui Su, Yan Liu, Zhanyu Ma, Jun Xu, Jiuchong Gao, et al. 2026. State rank dynamics in linear attention llms. arXiv preprint arXiv:2602.02195.
Kimi Team, Yu Zhang, Zongyu Lin, Xingcheng Yao, Jiaxi Hu, Fanqing Meng, Chengyin Liu, Xin Men, Songlin Yang, Zhiyuan Li, et al. 2025. Kimi linear: An expressive, efficient attention architecture. arXiv preprint arXiv:2510.26692.
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. Advances in neural information processing systems, 30.
Samuel Williams, Andrew Waterman, and David Patterson. 2009. Roofline: an insightful visual performance model for multicore architectures. Communications of the ACM, 52(4):65–76.
Songlin Yang, Jan Kautz, and Ali Hatamizadeh. 2025. Gated delta networks: Improving mamba2 with delta rule. In International Conference on Learning Representations, volume 2025, pages 29687–29707.
Songlin Yang, Bailin Wang, Yikang Shen, Rameswar Panda, and Yoon Kim. 2023. Gated linear attention transformers with hardware-efficient training. arXiv preprint arXiv:2312.06635.
Jian Yin, Hui Yu, Weizhi Xu, Yuxuan Wang, Zhu Tian, Yingping Zhang, and Bochuan Chen. 2014. Highly parallel gemv with register blocking method on gpu architecture. Journal of Visual Communication and Image Representation, 25(7):1566–1573.
A Additional Derivations
A.1 Proof of Theorem 1
We prove the result by induction on . The initial condition holds by assumption. Suppose . Since and , we have
Furthermore, implies , and hence . Substituting these identities into the original Gated Delta Rule yields
Therefore, the recurrent states are identical under the compact representation. The corresponding outputs satisfy
Thus, both the recurrent-state identity and output equivalence hold for all t.
B GPU Implementation Details
B.1 Packed Heterogeneous State Layout
SPARE employs a packed memory layout to support heterogeneous rank allocations without padding individual heads to a uniform dimension. For a model with layers and heads per layer, let denote the rank assigned to head in layer , and let be the total rank budget. The compact coefficient matrices are stored in a contiguous tensor , where denotes the batch size. Each head occupies a contiguous region containing the transpose of its coefficient matrix, with its starting offset determined by the cumulative ranks of preceding heads. These offsets remain fixed throughout inference, allowing GPU kernels to access individual recurrent states without constructing padded intermediate tensors. The corresponding projection bases are stored separately and shared across requests. For bytes per state element, the recurrent-state memory requirements are
In our 24-layer Gated DeltaNet with eight heads per layer and , a total rank budget of reduces FP32 recurrent-state storage from 48 MiB to 6 MiB per request. The original short-convolution states are preserved and accounted for separately from the compressed recurrent states.
B.2 Efficient Recurrent Decoding
We implement SPARE's compact recurrent computation using Triton GPU kernels operating directly on the packed coefficient matrices. At each decoding step, the normalized key and query are projected onto their corresponding fixed subspaces, following Eq. (4). The kernels then compute the old-value prediction , apply the compensated update in Eq. (9), and obtain the recurrent output using Eq. (5). The coefficient matrices are updated in place, avoiding additional persistent state copies and dense-state reconstruction. The implementation preserves the original key normalization, query scaling, decay factors, and update gates of Gated DeltaNet, while maintaining FP32 arithmetic for recurrent states. Unlike methods that explicitly reconstruct a full matrix, SPARE performs its state-dependent reads and updates on coefficients. Consequently, the recurrent-state access cost scales with the allocated rank rather than the original key dimension, although key and query projections introduce additional computation. This trade-off is particularly favorable at high batch sizes, where recurrent-state memory traffic becomes a substantial fraction of decoding time.
B.3 CUDA Graph Execution
To reduce kernel-launch overhead during autoregressive decoding, SPARE supports stateful CUDA Graph execution. A key requirement is that recurrent states must remain at fixed memory addresses across successive decoding steps. Our implementation maintains address-stable packed coefficient buffers and updates their contents in place, while preserving the original convolution caches. Input token IDs are copied into fixed GPU buffers before each graph replay, allowing successive decoding steps to process different tokens without changing the captured execution graph. Since graph capture and warmup can modify recurrent states, the implementation restores the corresponding prefill states into the captured buffers before measured execution. Host-side cache bookkeeping is also advanced consistently with the dependent decoding steps. We validate graph execution against eager inference using identical initial states and token sequences, checking recurrent coefficients, convolution states, and output logits. For sufficiently large packed tensors, 64-bit pointer offsets are used to avoid integer overflow in GPU memory addressing. These measures enable repeated state-dependent graph execution without retaining the original dense recurrent state.
B.4 Parallel Prefill Compatibility
Although SPARE primarily targets decoding, its compact recurrence is algebraically compatible with the parallel Gated Delta Rule used during pre-fill. To see this, define the transformed key and value vectors as
Substituting these variables into the standard Gated Delta Rule gives
which is algebraically equivalent to Eq. (9). The query remains and is not rescaled by the write-compensation factor. This formulation allows SPARE to reuse existing chunkwise parallel Gated Delta Rule operators with reduced key dimensions. For heterogeneous ranks, heads with identical ranks are grouped for parallel computation, and their updated coefficients are written back into the original packed state buffer. The implementation preserves the original normalization and gating semantics rather than applying additional normalization after projection. In practice, grouped parallel prefill can introduce extra workspace, shape-specialization overhead, and numerical differences due to floating-point operation ordering. We therefore retain a validated sequential prefill path and use parallel execution only for supported configurations that satisfy the numerical correctness checks. As a result, compatibility with parallel prefill does not imply that SPARE universally accelerates the prefill stage.
B.5 Memory and Performance Accounting
The compact recurrent-state size in Eq. (15) measures only the persistent coefficient storage and does not represent the complete GPU memory footprint. Actual inference memory additionally includes model parameters, shared projection bases, convolution caches, temporary workspaces, intermediate activations, and CUDA Graph allocations. We distinguish recurrent-state storage from the measured peak allocated and reserved GPU memory throughout our experiments. Similarly, reduced state capacity does not by itself establish a proportional reduction in physical GPU memory traffic. We therefore measure recurrent-kernel DRAM reads and writes using hardware profiling counters and evaluate decoding latency using complete-model execution. The reported decoding measurements include all model layers and maintain recurrent and convolution states across dependent token steps. All reported speedups are obtained from synchronized fixed-batch workloads with appropriate same-device Dense baselines and do not imply improvements in continuous-batching serving throughput.