Manuscript Offprint
arXiv:2610.41420SparseGDN: Chunk Sparse in Linear Attention
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Gated Delta Networks (GDNs) offer linear-time sequence modeling, yet long-context prefill remains costly due to dense intra-chunk computation, recurrent-state updates, and intermediate state storage. We introduce SPARSEGDN, a hardware-aware framework that combines structured intra-chunk approximation with input-dependent recurrent-event selection while producing outputs for every token. A block-adjacent solver reduces local Delta-solve computation, while a dynamic selector allocates recurrent-update budgets across head pairs. The GPU implementation materializes updates only for selected events and reconstructs token outputs using compact state snapshots and group-local interactions, reducing computation and memory traffic. We evaluate SPARSEGDN on Qwen3.5-4B and Qwen3.5-9B across RULER tasks and context lengths from 4K to 128K. Retaining approximately 29% of recurrent events on average, SPARSEGDN achieves 1.50–1.94× GDN-core prefill speedups over native FLA kernels, including online selection overhead.
Date: November 2, 2026
Correspondence: haoji_hu@zju.edu.cn
Qwen3.5-4B: GDN-Core Prefill Latency

Qwen3.5-9B: GDN-Core Prefill Latency
Figure 1 GDN-core prefill latency across context lengths for Qwen3.5-9B and Qwen3.5-4B. Compared with FLA GDN, SPARSEGDN additionally includes the online selector overhead. Latency is aggregated over all 24 GDN layers. SPARSEGDN reduces latency at every context length, reaching 1.93× and 1.94× speedup at 128K for the 9B and 4B models, respectively. Lower is better.

(a) Inter-chunk recurrent-state changes across value heads.
(b) Dense intra-chunk coefficients and block-adjacent support.
Figure 2 Two empirical structures observed in layer 16 of native-dense Qwen3.5-4B on an 8K RULER input (niah_multikey_3, row 0). (a) Adjacent chunk-boundary states are frequently nearly stationary, while the magnitudes of their changes vary substantially across value heads. (b) The left panel shows , averaged over 123 complete 64-token chunks and all 32 value heads. Here is the native Delta-solve matrix defined in Section 2.3; subtracting removes the unit diagonal, and absolute values are taken elementwise before averaging. The coefficients concentrate near the causal diagonal and weaken across more distant token blocks. This observed locality motivates the block-adjacent approximation, whose computation support is shown in the right panel.
1 Introduction
The quadratic cost of self-attention remains a major obstacle to efficient long-context prefill in Transformer-based language models [12, 22, 53, 62]. Recurrent and state-space architectures offer an alternative by summarizing historical information in a fixed-size state and processing sequences with linear complexity [11, 18, 20, 23]. Gated Delta Networks (GDNs) combine input-dependent state updates with expressive associative-memory dynamics [40, 58, 59]. Nevertheless, linear asymptotic complexity alone does not guarantee efficient execution. During long-context prefill, dense GDN implementations perform local Delta solves within every chunk, materialize update matrices, propagate recurrent states across chunks and heads, and reconstruct token outputs from dense state snapshots. These operations incur substantial arithmetic and memory-traffic costs at context lengths of tens or hundreds of thousands of tokens.
Figure 2 illustrates two empirical structures that motivate sparsification in GDN prefill. At the level, we examine the recurrent state of value head h at chunk boundary c and measure its symmetric relative change:
For the layer and input shown in Figure 2a, the median state change is 6.56%, 63.8% of head-chunk transitions change by less than 10%, and the median cosine similarity between adjacent states is 0.9979. These state dynamics vary substantially across heads: 21 of 32 value heads have a median change below 10%, whereas a smaller subset exhibits large and persistent changes. Related head heterogeneity has also motivated distinct cache policies for retrieval and streaming attention heads [56]. Small state changes alone do not establish that an update can be removed safely, but the observed variation motivates testing retention policies that adapt to different inputs, layers, and heads.
At the level, Figure 2b summarizes the mean absolute off-diagonal coefficients of the native 64-token Delta solve across chunks and value heads. The coefficients are strongest near the causal diagonal and become weaker across more distant 16-token blocks. This locality motivates restricting the support of the local inverse to diagonal and immediately adjacent blocks.
Building on these observations, we introduce SPARSEGDN, a two-level sparsification framework for GDN prefill. A block-adjacent solver reduces intra-chunk Delta-solve computation, while a dynamic selector allocates retention budgets across head pairs and selects recurrent events. Selection uses tail activation statistics, recurrent lifetime estimates, and output-gate information available before recurrent propagation, avoiding the need to execute candidate updates before deciding which to retain.

Figure 3 End-to-end SparseGDN execution pipeline. The block-adjacent intra-chunk kernel computes transformed values U, compact update coefficients, and selector scores. The dynamic selector converts these scores into a structured event mask. Only selected events trigger deferred W materialization and recurrent-state updates, producing compact event states. During output reconstruction, the mapped output kernel retrieves the appropriate preceding event state from HBM and applies the accumulated gap decay, while computing group-local interactions and producing outputs for every token.
To realize GPU speedups from this sparsity [17, 61, 64], SPARSEGDN materializes update matrices only for selected events and packs them into a compressed sparse row (CSR) layout. The recurrent kernel scans retained events, aggregates decay across skipped chunks, and stores compact state snapshots. A mapped output kernel combines these snapshots with group-local causal interactions to produce outputs for every token.
We evaluate SPARSEGDN on Qwen3.5-4B and Qwen3.5-9B using the RULER long-context benchmark [21]. Our evaluation covers 13 tasks and six context lengths from 4K to 128K. Across these settings, SPARSEGDN retains approximately 29% of recurrent pair-chunk events on average. It achieves 1.50×–1.94× GDN-core prefill speedups for Qwen3.5-4B and 1.50×–1.93× for Qwen3.5-9B. These measurements include online selection overhead and aggregate latency over all 24 GDN layers in each model. The gains increase with context length.
Our main contributions are:
-
We identify complementary intra-chunk coefficient locality and inter-chunk state heterogeneity, and develop a two-level sparsification strategy that combines a block-adjacent Delta solve with input-dependent recurrent-event selection.
-
We design a GPU execution pipeline with deferred update materialization, CSR-based event scanning, compact state storage, and mapped output reconstruction to reduce computation and memory traffic while producing outputs for every token.
-
We demonstrate consistent GDN-core prefill acceleration on Qwen3.5-4B and Qwen3.5-9B over context lengths from 4K to 128K, while maintaining comparable aggregate performance across RULER tasks.
2.1 Dense GDN Prefill
For clarity, we omit the batch dimension. Let the query, key, and value tensors be
where is the sequence length. In Qwen3.5-4B and Qwen3.5-9B, , , and . Each query/key head is shared by two adjacent value heads. For a fixed value head , we write and for its associated query/key matrices, suppressing their shared head index.
The input sequence is partitioned into chunks of tokens. For chunk and value head , the dense intra-chunk operator produces a transformed value matrix and a read-correction matrix . Both matrices are obtained from the local Delta solve, whose formulation is given in Section 2.3. Let denote the recurrent state before processing chunk . The state-corrected values are
Let be the chunk-local cumulative gate in log-base-two space, and let be its final value. Thus, is the cumulative retention from the start of chunk through token , and is the retention from just after token to the chunk boundary. Exponentials act elementwise; in products with matrices, broadcasts each gate vector across feature channels to scale token rows. The recurrent state update is
The GDN-core output precedes the model's RMSNorm, output gating, and output projection. It combines the historical recurrent state with causal local interactions:
where
An incomplete final chunk is padded with zero keys, values, and update strengths and unit per-token retention, so padded positions neither write to nor decay the state. Only outputs for the original T tokens are returned.
Although the computation scales linearly with , the dense chunkwise implementation materializes , performs recurrent updates, and stores intermediate states for every chunk and value head.
2.2 Method Overview and Approximation Boundary
SPARSEGDN sparsifies GDN prefill at two levels. Within each chunk, it replaces the full Delta solve with a block-adjacent approximation. Across chunks, it applies recurrent read corrections and state writes only at dynamically selected events. Each recurrent event corresponds to one chunk and one pair of adjacent value heads, which share an event mask. State decay is preserved across skipped chunks, and outputs are computed for every token.
Output reconstruction operates on consecutive two-chunk groups . Within each group, the odd chunk's output retains the preceding even chunk's local contribution even when that even chunk is skipped by the recurrent stage. This local contribution does not enter the persistent state or the subsequent recurrent read correction. The group-local output rule is therefore part of the sparse operator definition, as detailed in Section 2.7 and Equation (25).
For the resulting sparse operator, deferred materialization of , CSR-based recurrent propagation, compact state storage, and mapped output evaluation are execution optimizations. They preserve the operator's algebraic definition while reducing intermediate materialization and state traffic.
The full pipeline consists of
2.3 Block-Adjacent Intra-Chunk Computation
For a fixed chunk and value head, we omit their indices. Let contain the token-wise update strengths. The native local Delta solve uses
The dense transformed values and read-correction matrix solve
The update strengths therefore enter both the interaction matrix and the right-hand sides.
Motivated by the locality observed in Figure 2b, we divide each 64-token chunk into four consecutive blocks of tokens. We approximate by a block matrix supported on four diagonal blocks and three immediately adjacent cross-blocks:
Let denote the corresponding block of M. For each diagonal block, we compute
and for each adjacent block pair,
All other blocks of C are zero. In exact arithmetic, the retained blocks coincide with the corresponding blocks of ; the approximation omits the more distant lower-triangular blocks. This support retains 1,248 of the 2,016 causal off-diagonal entries in a 64-token chunk.
From this point onward, U and W denote the block-adjacent approximations to their dense counterparts. The seven retained blocks are reused to form two sets of weighted coefficients. For , define
Here and are the restrictions of the chunk's update-strength and cumulative-gate vectors to source block . Right multiplication scales the columns of . Thus, contains inverse-solve coefficients, generates , and generates .
Let , , , and denote the -th 16-token blocks of , , , and , respectively, following the block labels in Figure 3. The block-adjacent transformed values are
The four transformed-value blocks are computed and stored progressively, reducing the number of simultaneously live accumulator tiles.
The Intra kernel stores the seven compact blocks of for deferred materialization, while consuming locally to compute . It also computes a tail statistic while remains on chip. Restoring the chunk and head indices, this statistic is

Figure 4 Dense versus SparseGDN execution. The dense chunkwise implementation materializes , updates the recurrent state, and stores a chunk-boundary state for every chunk. SparseGDN materializes and performs recurrent read/write only at selected events; accumulated decay bridges skipped chunks (red arrows), and only intermediate state snapshots required by downstream output groups are stored in HBM. The final recurrent state is returned for decoding. Mapped group-2 reconstruction reuses one group-start state for two adjacent chunks while still producing outputs for every token. Dashed boxes denote skipped computation or elided state storage.
Tail-16 uses transformed-value magnitude near the chunk boundary as a low-cost proxy for recurrent-write strength. In Equation (2), each token's contribution is weighted by . Because per-token retentions lie in , later tokens undergo no more cumulative attenuation than earlier ones. The values already incorporate update strengths and the retained local Delta interactions, allowing scoring before materialization and the state-dependent correction . The 16-token window matches the final tile , so its Frobenius norm can be computed without rereading from HBM.
This score is a ranking heuristic. The actual recurrent write also depends on the keys, decay weights, and corrected values . Tail magnitude alone does not bound the write magnitude or downstream error, and important contributions may occur earlier in the chunk. We therefore use it as the base signal in a selector whose budget allocation also accounts for recurrent lifetime and output visibility (Section 2.4). Section 3.5 evaluates its diagnostic ranking quality, and the left panel of Figure 10 compares ranking recall and standalone score-kernel cost across window sizes. The choice of 16 tokens is an empirical and implementation trade-off.
2.4 Dynamic Event Selection
The selector determines which recurrent events to retain and how much computation each head pair receives. It first ranks chunks within each pair, estimates the benefit of larger budgets, and then assigns each pair a low-, medium-, or high-retention tier (Figure 5). Let be the number of valid chunks. There are 16 head pairs per layer. Only valid chunks participate in selection; workspace padding is excluded. When , the sole chunk is retained. The following formulas assume . For clarity, numerical safeguards are omitted; normalization maps all-zero vectors to zero.
2.4.1 Rank chunks within each head pair
For the ranking, upgrade-gain, and mask formulas, we fix one head pair and omit its index. Sums over in these formulas run only over its two value heads. We normalize the Intra score from Equation (9) separately for each head and average:
This per-head normalization balances the two heads' contributions to chunk ranking.
Each pair has three candidate budgets, with retention rates

Figure 5 Dynamic event selection and packing. Here, denotes the -th 16-token block of the pre-activation output-gate tensor within a chunk. Chunk scores determine the retention order within each head pair. Recurrent lifetime and output-visibility proxies weight the estimated gains from larger budgets, which determine the low-, medium-, and high-retention tiers. The example assigns 9, 4, and 3 pairs to these tiers. Selected events are packed in temporal order into CSR chains for recurrent execution.
Tier keeps
chunks. The first and last chunks are mandatory anchors, and the remaining chunks are selected by . Using the same ranking gives nested candidate sets
2.4.2 Estimate the benefit of higher retention
We weight the additional scores retained by a larger budget using head-wise estimates of recurrent persistence and output visibility. Let be the mean chunk-end retention over the last valid chunks. Using as a constant per-chunk retention, we construct a truncated geometric persistence weight with a common horizon of chunks.
To estimate output visibility, we sample entries of the pre-activation output-gate tensor . This tensor is projected from the layer input and is available before recurrent propagation; it subsequently modulates the normalized GDN-core output before output projection. Let be the mean squared magnitude of the sampled entries after SiLU and multiplication by the learned RMSNorm scale. The lifetime and relative visibility weights are
Here, averages gate energy over all value heads in the same layer and request. The lifetime weight estimates persistence due to gate decay under the constant-retention approximation; it does not model how subsequent Delta updates modify existing information. The visibility weight measures relative gate energy: at average energy, with larger values indicating stronger gate scaling.
For either upgrade , we sum the weighted scores of the additional chunks it would retain:
Unlike the normalized scores used for chunk ranking, this gain uses the original magnitudes to preserve strength differences across heads and pairs. It is a heuristic proxy for the benefit of increasing a pair's budget.
Repeating this calculation for all pairs, we normalize each upgrade-gain vector by its mean across pairs, obtaining for and for . Together, these two vectors form a array of normalized upgrade gains.
2.4.3 Assign head-pair budgets
We assign high-retention pairs first, then medium-retention pairs from those remaining. Both decisions use the same split criterion. For a descending vector x of n gains, define
where each bar denotes the mean over the indicated ranks. This criterion measures the separation between the higher- and lower-gain groups induced by a cut.
First, sort and choose to maximize . The first pairs receive the high tier. Then sort over the remaining pairs and apply the same criterion within the following candidate counts:
For , set directly. Assign the first remaining pairs to medium and all others to low.
The nominal retention rate is
The candidate middle-tier counts are centered on , keeping nominal retention near 30%. Allowing neighboring counts gives a nominal range of 28.44%–31.31%. The selected tier counts, integer rounding, and anchors determine the actual keep rate, which averages approximately 29% in our experiments.
For the fixed pair, let be its assigned tier. Its event mask is
Both value heads share this mask while maintaining independent recurrent states.
Gate sampling. Gate energy samples one token position per 16-token block, at zero-based offsets 8, 24, 40, 56 within each valid chunk. At each sampled position, it reads one rotating value coordinate of Z per head:
where is the learned RMSNorm scale, , and . Out-of-range samples are zero.
Numerical and boundary conventions. The geometric sum for approaches as approaches one. Equal ranking scores prefer smaller chunk or pair indices, and keep counts use ties-to-even rounding. Numerically tied split scores prefer the count closest to the fallback, then the smaller count. Flat scores use fallback counts of 3 for high and for medium. The workspace pads to chunks without adding selection candidates.
2.5 Deferred Update Materialization and Event Layout
The dense chunkwise implementation materializes for every chunk and value head. SPARSEGDN stores the seven weighted coefficient blocks during Intra (Section 2.3) and materializes after selection, only for retained events.
For a selected chunk and value head, the four 16-token blocks of W are
Here, is the source key block. Since already incorporates the source-token update strengths and cumulative gates, this stage multiplies the stored coefficients by the corresponding key blocks.
The selected events are organized in a compressed sparse row (CSR) layout, with one row per head pair. Rows are ordered by tier from high to medium to low, with increasing physical head-pair indices within each tier. Within each row, retained chunks appear in increasing temporal order. This arrangement prioritizes longer event chains during recurrent execution. The event representation and its output-mapping metadata contain:
• pair_order, which maps each CSR row to its physical head pair;
• event_offsets, which delimit the event interval for each CSR row;
• event_indices, which store retained chunk indices in temporal order within each row;
-
group_event_map, which maps each head pair and output group to the packed index of the latest retained event strictly before the group starts, using -1 when no such event exists; and
-
decay_prefix, which stores per-value-head prefix sums of chunk-end log-retentions for gap-decay reconstruction.
The number of selected pair-chunk events is
where is the number of head pairs assigned to tier , and is the corresponding number of retained chunks per pair.
We distinguish this valid event count from the allocated capacity. The host reserves space for the case in which every pair receives the high tier:
Only the first event slots contain valid read-correction matrices, which are written directly in CSR event order. The two value heads are interleaved within each token row. The final CSR offset stores the actual count on the GPU, allowing subsequent kernels to identify valid event intervals without copying to the host. Thus, buffer allocation does not require a device-to-host synchronization to determine the selected event count.
2.6 Event-Sparse Recurrent Propagation
For zero-initialized prefill, . Using the block-adjacent Intra outputs, the recurrent stage processes the selected events for each head pair in temporal order. For a retained event at chunk , each value head applies the recurrent read correction and state write:
For a skipped event, the sparse recurrence is defined by
Thus, skipping an event preserves state decay while omitting the read correction and the write of new content into the persistent state. Token outputs are still produced for the chunk by the output stage.

Figure 6 Tier-aware scheduling of heterogeneous recurrent event chains. High-, medium-, and low-retention head pairs induce event chains with different workloads. Scheduling them in physical-head order can place a long high-tier chain behind shorter tasks, creating an SM straggler and extending kernel completion time (left). SparseGDN orders chains by expected workload and uses event-count-adaptive execution to distribute them across SMs (right), reducing load imbalance and tail latency. The red dashed line denotes kernel completion.
The kernel avoids visiting skipped chunks individually by using prefix sums of chunk-end log-retentions:
These prefixes include both retained and skipped chunks. For consecutive retained events at chunks , the decay across the intervening skipped chunks is
The state entering chunk c is therefore
For adjacent retained chunks, the empty product equals one. Decay within chunk c is applied by Equation (18). The recurrent kernel scans each CSR event chain and applies one accumulated decay per gap, preserving the algebraic recurrence defined by Equation (19).
The transformed-value buffer is reused in place. It initially stores , and the recurrent kernel overwrites only retained events with their corrected values . Skipped events remain unchanged and already satisfy . The same buffer therefore supplies the corrected values for all chunks to the output stage.
The scan carries the current recurrent state between events. Among intermediate states, only post-update snapshots referenced by later output groups are stored in the compact event-state buffer. The final state is returned separately to initialize autoregressive decoding. This representation reduces intermediate state stores while preserving the snapshots needed for mapped output reconstruction (Section 2.7).
2.7 Mapped Group-Wise Output Reconstruction
SPARSEGDN produces outputs for every token by combining states from sparse recurrent propagation with group-local interactions. We fix one value head and omit its index. Group consists of chunks and , and denotes the state before chunk . The mask is shared by the corresponding value-head pair. The output stage reads the buffer from Section 2.6, with for skipped events. If the number of valid chunks is odd, the final group is completed with a neutral padding chunk under the convention in Section 2.1. Only outputs for the original tokens are returned.
For the current head pair and output group, group_event_map locates the latest retained event before the group starts. If that event occurs at chunk , its stored post-update snapshot is . The group-entry state is recovered using the decay prefix:
With zero-initialized prefill, a group with no preceding event uses .
For the local interaction matrices below, the two subscripts identify the output chunk and source chunk, respectively. Let denote the within-chunk causal matrix from Equation (4). The adjacent cross-chunk matrix is
All tokens in chunk precede those in chunk , so this cross-chunk matrix requires no additional triangular mask.
Both outputs reuse the group-entry state:
The odd-chunk historical term includes the decay across chunk . Its two local terms use the concatenated keys and corrected values of the group. The adjacent term is included independently of . Direct local interactions remain within the group; earlier history is represented by .
The persistent state and recurrent read correction still follow Section 2.6:
(24)
Thus, the local contribution from a skipped even chunk affects the group output without entering this layer's persistent state or the odd chunk's recurrent read correction.
To isolate the effect of the output rule, fix the Intra outputs and event mask. Let denote Equation (3) evaluated using the same sparse state and corrected values . Subtracting this per-chunk output from the group output gives
When , the two output rules agree algebraically for the same sparse state and corrected values. When , the group output additionally retains , since . This group-local read is part of the sparse operator defined in Section 2.2.
For example, Figure 4 skips chunk 4 and retains chunk 5. The persistent state and corrected values satisfy
The local inputs for are and , where the semicolon denotes concatenation along the token dimension. The output therefore includes , while the recurrent correction uses the decay-only state .
The kernel fuses the adjacent and within-chunk local terms and reuses the reconstructed group-entry state for both outputs. This avoids materializing a separate intermediate state snapshot for the odd chunk's output.
3 Experiments
We evaluate SPARSEGDN along two dimensions: long-context task performance and GDN-core inference efficiency. Experiments are conducted on both Qwen3.5-4B and Qwen3.5-9B to evaluate whether the proposed sparsification strategy generalizes across model scales.
Table 1 RULER scores, recurrent-event sparsity, and GDN-core speedup for Qwen3.5-4B and Qwen3.5-9B. Scores follow the official RULER scoring rules and are reported as percentages. is the arithmetic difference between the Sparse and Base columns, computed from unrounded scores. Both scores and their differences are expressed on the percentage scale. Speedup compares native Intra+ against SPARSEGDN Selector+Intra+, using the 24-layer GDN-core timing protocol in Section 3.1. Event sparsity is the mean fraction of valid recurrent pair-chunk events omitted across evaluation requests; padding chunks are excluded. The All row averages across the six context lengths.
| Length | Qwen3.5-4B | Qwen3.5-9B | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Base | Sparse | (%) | Event sp. (%) | Speedup | Base | Sparse | (%) | Event sp. (%) | Speedup | |
| 4K | 96.641 | 96.377 | -0.264 | 70.937 | 1.498× | 96.821 | 96.846 | +0.026 | 70.921 | 1.500× |
| 8K | 96.282 | 96.333 | +0.051 | 70.955 | 1.504× | 96.872 | 96.179 | -0.692 | 71.005 | 1.506× |
| 16K | 96.121 | 96.462 | +0.341 | 70.915 | 1.696× | 96.369 | 96.308 | -0.062 | 70.971 | 1.702× |
| 32K | 96.344 | 96.097 | -0.246 | 70.934 | 1.830× | 96.744 | 96.831 | +0.087 | 70.917 | 1.825× |
| 64K | 95.985 | 96.274 | +0.290 | 70.998 | 1.891× | 96.641 | 96.538 | -0.103 | 70.976 | 1.892× |
| 128K | 95.482 | 95.413 | -0.069 | 70.997 | 1.943× | 96.256 | 96.310 | +0.054 | 70.949 | 1.929× |
| All | 96.142 | 96.159 | +0.017 | 70.956 | - | 96.617 | 96.502 | -0.115 | 70.957 | - |
3.1 Experimental Setup
Models. We evaluate Qwen3.5-4B and Qwen3.5-9B. Both models contain 24 GDN layers with the same recurrent geometry: 16 query/key heads, 32 value heads, and key and value head dimensions of 128. Model activations and tensor-core matrix multiplication inputs use BF16, while recurrent-state accumulation and selector statistics use FP32.
Dataset. We use the RULER long-context benchmark [21], which evaluates retrieval, multi-hop tracing, aggregation, and question answering. We evaluate all 13 tasks at six context lengths: 4K, 8K, 16K, 32K, 64K, and 128K. Each task-length configuration contains 100 examples, giving 1,300 examples per length and 7,800 examples per model.
Efficiency measurement. We measure GDN-core prefill latency using PyTorch 2.9.0+cu128, Triton 3.5.0, and Transformers 5.9.0. Unless stated otherwise, the batch size is one. These measurements use a fixed timing workload at each length; they are not averages over the RULER evaluation set.
Each configuration receives five warm-up iterations followed by 30 measured iterations using CUDA events. For each measured iteration , we sum each phase's time over all 24 GDN layers. The native core time is
The SPARSEGDN core time includes online selection:
For SPARSEGDN, the timed phase includes deferred materialization and the subsequent event scan. Native construction is included in Intra. The timed regions exclude GDN input/output projections and surrounding preprocessing and postprocessing, as well as softmax-attention layers, MLPs, tokenization, and autoregressive decoding. The reported results therefore measure GDN-core prefill latency.
3.2 Main Results
Table 1 summarizes RULER scores, recurrent-event sparsity, and GDN-core speedup for the default SPARSEGDN configuration. Across the evaluation requests, SPARSEGDN retains approximately 29% of recurrent pair-chunk events on average, corresponding to approximately 71% event sparsity.
Qwen3.5-4B: Intra + Selector Latency

Qwen3.5-4B: H Latency
Qwen3.5-4B: O Latency
Qwen3.5-9B: Intra + Selector Latency
Qwen3.5-9B: H Latency

Qwen3.5-9B: O Latency
Figure 7 Per-stage GDN-core prefill latency. The top and bottom rows show Qwen3.5-4B and Qwen3.5-9B, respectively. The left column compares native Intra with SPARSEGDN Intra plus online Selector; the middle and right columns compare H and O. For SPARSEGDN, H includes deferred W materialization. Each component reports the median of per-iteration CUDA-event times summed over all 24 GDN layers. The stacked Intra-plus-Selector bars sum the two component medians. Boxed values denote the corresponding native-to-sparse latency ratios. Lower latency is better.
Long-context accuracy. For Qwen3.5-4B, the aggregate RULER score changes from 96.142% to 96.159%, a difference of +0.017%. The largest absolute score difference across context lengths is 0.341% at 16K.
For Qwen3.5-9B, the aggregate score changes from 96.617% to 96.502%, a difference of -0.115%. The largest score decrease is 0.692% at 8K. At each of the other five context lengths, the absolute score difference is at most 0.103%. The aggregate scores over 7,800 examples remain close to their respective baselines for both models.
GDN-core efficiency. Both models achieve approximately speedup at 4K, including online selection overhead. Across the measured lengths, the total GDN-core speedup increases with context length, reaching for Qwen3.5-4B and for Qwen3.5-9B at 128K.
In these measurements, selection overhead accounts for a smaller fraction of sparse core time at longer contexts. Longer inputs provide more chunk-level work over which to amortize fixed kernel-launch overhead, while increasing the absolute savings from sparse computation and reduced state traffic. The similar speedups across the two models are consistent with their identical GDN-core tensor geometry and number of GDN layers.
Stage-wise latency breakdown. Figure 7 separates the core computation into Intra plus online Selector, recurrent-state propagation (H), and output reconstruction (O). Across the evaluated context lengths, the combined Intra-plus-Selector phase achieves speedup over native Intra for Qwen3.5-4B and for Qwen3.5-9B. This reduction reflects the block-adjacent solve, progressive value computation, and the relocation of W construction to the timed H phase, where it is performed only for retained events.
Including deferred W materialization, the H phase achieves approximately speedup at 4K and at 128K for both models. The event scan omits recurrent read corrections and state writes for skipped chunks while preserving their accumulated decay.
The O phase achieves speedup across the two models and evaluated lengths. Its gains are more modest because outputs and local causal interactions are still computed for every token. Savings arise from compact state snapshots and mapped group-wise reconstruction, which reuse a group-entry state across two adjacent chunks.

Figure 8 GDN-core speedup across batch sizes and context lengths. Speedup is Native/Sparse, includes online selection, and uses batch latencies aggregated over all 24 GDN layers. Crosses mark configurations without a paired speedup because Native runs out of memory. Crosses are placed at a fixed height for display and do not represent measured speedups. The corresponding sparse-only outcomes are detailed in Table 2. Every completed paired configuration favors SPARSEGDN. Higher is better.
Table 2 Batched GDN-core speedup (Native/Sparse). OOM† indicates that Native runs out of memory in the benchmark harness, while SPARSEGDN completes in a separate process. Plain OOM indicates that Native runs out of memory and sparse completion has not been independently verified. Speedups include online selection and cover only the GDN core.
| Model | Batch | 4K | 8K | 16K | 32K | 64K | 128K |
|---|---|---|---|---|---|---|---|
| 4B | 2 | 1.649× | 1.723× | 1.826× | 1.933× | 1.945× | 1.988× |
| 4B | 4 | 1.582× | 1.659× | 1.738× | 1.799× | 1.833× | OOM† |
| 4B | 8 | 1.560× | 1.615× | 1.675× | 1.750× | OOM† | OOM |
| 9B | 2 | 1.651× | 1.736× | 1.839× | 1.928× | 1.931× | 1.939× |
| 9B | 4 | 1.574× | 1.653× | 1.737× | 1.807× | 1.830× | OOM |
| 9B | 8 | 1.560× | 1.611× | 1.673× | 1.748× | OOM | OOM |
3.3 True-Sparse Batch Scaling
We extend the batch-size-one evaluation to batch sizes 2, 4, and 8. The selector, event masks, state layouts, and kernels operate with an explicit batch dimension. For batch size , we use the first requests from niah_single_1, repeating or truncating each tokenized prompt to the same target length. Native and SPARSEGDN receive identical batch inputs.
For this experiment, CUDA events measure a contiguous core interval in each GDN layer. The native interval covers Intra, , and , while the sparse interval additionally includes online selection. Deferred W materialization is included in the sparse phase. We use one warm-up iteration followed by five measured iterations. For each iteration, we sum the intervals over all 24 GDN layers and report the median of these totals. These are GDN-core latencies for an entire batch. Speedup is the native median divided by the sparse median. Figure 8 shows the scaling trends, and Table 2 reports the corresponding speedups and memory-related missing results.
Across all completed paired configurations, SPARSEGDN achieves GDN-core speedup. At a fixed batch size, speedup increases with context length across the measured points. At a fixed length, the
Table 3 Retention-rate trade-off over all six context lengths. Keep is the mean fraction of valid recurrent pair-chunk events retained across evaluation requests; padding chunks are excluded. is the arithmetic difference in aggregate RULER scores, computed from unrounded scores over 7,800 examples per model using the official scoring rules. Scores and their differences are expressed on the percentage scale. Speedup is the geometric mean of the six GDN-core speedups at batch size one under the timing protocol in Section 3.1, including online selection. Higher speedup and are better.
| Operating point | Qwen3.5-4B | Qwen3.5-9B | ||||
|---|---|---|---|---|---|---|
| Keep (%) | (%) | Speedup | Keep (%) | (%) | Speedup | |
| 10%-budget | 9.760 | -2.063 | 2.089× | 9.755 | -2.281 | 2.099× |
| 20%-budget | 19.493 | -0.821 | 1.867× | 19.502 | -0.727 | 1.868× |
| Default | 29.044 | +0.017 | 1.718× | 29.043 | -0.115 | 1.717× |
| 40%-budget | 39.253 | +0.075 | 1.618× | 39.261 | +0.051 | 1.618× |
| 50%-budget | 49.325 | +0.053 | 1.425× | 49.337 | +0.033 | 1.425× |
relative speedup decreases as batch size grows. For example, at 32K, increasing batch size from 2 to 8 changes speedup from 1.933× to 1.750× for Qwen3.5-4B and from 1.928× to 1.748× for Qwen3.5-9B. Across the completed comparisons, the native baseline's per-sample latency decreases more rapidly with increasing batch size than that of SPARSEGDN, narrowing the relative speedup.
At the missing long-context points, the native execution runs out of memory in the benchmark harness before a paired timing result can be obtained. Separate sparse-only runs complete the Qwen3.5-4B batch-4/128K and batch-8/64K configurations in 843.411 ms and 835.367 ms, respectively. These measurements establish sparse-path feasibility for the two configurations; speedups remain unavailable because the corresponding native runs did not complete. For the remaining OOM entries, sparse completion has not been independently verified.
3.4 Accuracy--Efficiency Trade-off
The default operating point retains approximately 29% of recurrent events. We explore the accuracy-efficiency trade-off by varying the low-, medium-, and high-tier retention rates while keeping the selector rules and kernel pipeline unchanged. The five settings of () are (0.028, 0.10, 0.317), (0.056, 0.20, 0.633), (0.08, 0.30, 0.95), (0.20, 0.40, 1.0), and (0.333, 0.50, 1.0), corresponding to the 10%-budget, 20%-budget, default, 40%-budget, and 50%-budget configurations, respectively. These budget labels denote nominal targets; the reported keep rates are measured over evaluation requests. Head-pair assignments and selected chunks are recomputed for each input at each operating point.
Table 3 summarizes the aggregate results, and Figure 9 plots the evaluated operating points. All speedups in this section are geometric means over the six context lengths from 4K to 128K, measured at batch size one with online selection included. Reducing mean keep to approximately 9.8% yields speedups of about 2.1×, with aggregate score changes of −2.063% and −2.281% for Qwen3.5-4B and Qwen3.5-9B, respectively. The default configuration provides 1.718× and 1.717× speedups with score changes of +0.017% and −0.115%. At approximately 39.3% keep, both models achieve a 1.618× speedup and slightly higher observed aggregate scores than their corresponding baselines, with changes of +0.075% and +0.051%.
The approximately 49%-keep configuration is slower and has a slightly lower aggregate score than the approximately 39%-keep configuration for both models. It is therefore dominated among the evaluated operating points under these aggregate metrics. This comparison does not imply the same ordering at every context length.
3.5 Algorithmic and Selector Ablations
Table 4 compares intra-chunk approximations and recurrent-event policies on the complete 4K RULER set. All custom variants use the same group-local output rule from Section 2.7.
The adaptive variants apply sparse H corrections and writes while retaining group-local reads: dropped even
Sparse Pareto frontier
Dominated operating point


Figure 9 Accuracy--efficiency trade-off across retention budgets. Each panel plots the aggregate RULER score difference , defined in Table 3, against the geometric mean GDN-core speedup over 4K–128K. Point labels show measured recurrent-event keep rates. Solid lines connect nondominated configurations among the evaluated sparse operating points. The cross marks the approximately 49%-keep configuration, which is dominated by the approximately 39%-keep configuration for both models under these aggregate metrics. Speedups include online selection. Higher and farther right is better.
chunks still contribute to the following odd chunk's output as specified by Equation (25). These comparisons do not separately measure the effect of that local contribution. Full64 uses a custom BF16 kernel and is not bitwise identical to native FLA. Moreover, each adaptive variant recomputes its mask from its own Intra outputs; comparing Full64+adaptive with SPARSEGDN therefore includes mask reselection as well as the change in Intra.
The matched-budget random baseline confirms that accuracy does not follow from sparsity alone. At 4K, adaptive selection exceeds random selection by 1.310% for 4B (paired bootstrap 95% CI [0.481, 2.154]%) and 1.226% for 9B ([0.494, 1.983]%). Across all six lengths, the aggregate gaps grow to 2.006% and 1.614%, respectively; adaptive selection wins in all 12 model-length comparisons at essentially identical mean keep.
We further probe the selector components using a task-stratified set of 130 8K requests per model. Dense-decode importance estimates each prompt chunk's contribution along the native dense decoding trajectory. Non-anchor importance-mass recall measures the fraction of this estimated importance retained among non-anchor events. Recall and its arithmetic differences are expressed on the percentage scale. We disable output-gate visibility in the selector for these diagnostics to isolate the roles of tail-based ranking and recurrent lifetime; the model's output gate remains unchanged. Adding recurrent lifetime to the tail statistic raises non-anchor importance-mass recall by 32.037% for 4B and 31.484% for 9B. Holding head-pair tiers and exact budgets fixed, tail-based chunk ranking outperforms random ranking by 14.171% and 13.646%. Both effects hold on all 130 requests for each model.
In a separate end-to-end 8K ablation over 1,300 examples per model, we set the selector's output-gate visibility factor to one while retaining the model's output gate. This yields observed score decreases of 0.487% and 0.410% for 4B and 9B, respectively, despite a slight increase in mean keep. The paired 95% bootstrap confidence intervals for the score change after removing visibility are [-1.128, +0.128]% and [-1.077, +0.205]%, respectively; both include zero. The proxy-recall results diagnose routing and ranking; they are not substitutes for the end-to-end RULER comparisons above.
Adaptive tier counts. We evaluate the benefit of adapting tier counts in Section 2.4 by fixing in every GDN layer. The fixed variant selects three high-tier pairs first, then four medium-tier pairs
Table 4 Algorithmic component ablation on all 13 RULER tasks at 4K (1,300 examples per model). Scores and their arithmetic differences are expressed on the percentage scale. is the score difference from Native, computed from unrounded scores. Full64 + adaptive restores the full lower-triangular 64-token intra-chunk solve while retaining adaptive event selection; Block-adjacent + all retains every recurrent event. Adaptive and random variants use matched approximately 29% event budgets. All custom variants retain the same group-local output rule; Native uses the dense operator. Adaptive masks are recomputed for each Intra variant. Bold highlights the proposed method.
| Variant | Qwen3.5-4B | Qwen3.5-9B | ||||
|---|---|---|---|---|---|---|
| Score | (%) | Keep (%) | Score | (%) | Keep (%) | |
| Native | 96.641 | +0.000 | 100.000 | 96.821 | +0.000 | 100.000 |
| Block-adjacent + all | 96.410 | -0.231 | 100.000 | 96.846 | +0.026 | 100.000 |
| Full64 + adaptive | 96.669 | +0.028 | 28.991 | 96.787 | -0.033 | 29.017 |
| Block-adjacent + random | 95.067 | -1.574 | 29.029 | 95.621 | -1.200 | 29.029 |
| SparseGDN | 96.377 | -0.264 | 29.063 | 96.846 | +0.026 | 29.079 |
Table 5 Effect of adaptive tier counts on Qwen3.5-9B. Scores are official RULER percentages over 100 examples per task at each context length (13 tasks; 7,800 examples in total). All is the mean over the six lengths. Score differences reported in the text are computed from unrounded values. Keep is the mean per-request fraction of valid recurrent pair-chunk events retained, expressed as a percentage. Both variants use the same retention tiers; realized keep rates are not forced to match. Bold indicates the higher score at each length and in aggregate.
| Allocation | 4K | 8K | 16K | 32K | 64K | 128K | All | Keep (%) |
|---|---|---|---|---|---|---|---|---|
| Fixed counts 9/4/3 | 96.691 | 96.436 | 95.815 | 96.505 | 96.385 | 95.267 | 96.183 | 29.816 |
| Dynamic counts | 96.846 | 96.179 | 96.308 | 96.831 | 96.538 | 96.310 | 96.502 | 29.043 |
from the remainder, leaving nine low-tier pairs. Pair identities remain input-dependent. Score computation, pair and chunk ranking, the (0.08, 0.30, 0.95) retention rates, tie-breaking, valid-chunk quotas, anchors, and the sparse execution path are unchanged. We evaluate this variant on the same 7,800 Qwen3.5-9B examples as the main evaluation; the dynamic results reuse the corresponding outputs in Table 1.
Table 5 shows that dynamic allocation raises the aggregate official score from 96.183% to 96.502%, while reducing mean event keep from 29.816% to 29.043%. The paired gain is 0.319% (95% bootstrap CI [0.114, 0.532]%). We use 20,000 paired resamples stratified by task and context length; intervals are pointwise, without multiple-comparison adjustment. The largest gain occurs at 128K (+1.044%), although fixed counts perform slightly better at 8K (+0.256%). These results support adapting tier counts to improve the accuracy–retention trade-off on Qwen3.5-9B. Actual retention is reported separately for the two variants; this ablation does not measure selector latency.
Tail-window selection. We use Tail-16 as the default ranking window in Equation 9, balancing ranking quality with score-computation cost. To isolate the window's effect on ranking, we fix the Tail-16 pair-tier assignments, exact per-pair keep counts, and first/last-chunk anchors, and vary only the score used to order non-anchor chunks. The recall diagnostic uses 13 RULER tasks with 10 stratified 8K requests per task and model, under production routing with output-gate visibility. For each request, we average over all 24 GDN layers before performing 20,000 task-stratified bootstrap resamples.
The left panel of Figure 10 shows the recall lost when the ranking window is shortened. Moving from Tail-8 to Tail-16 raises importance-mass recall by 1.643% and 1.590% for 4B and 9B, respectively. Under the same production routing condition, Tail-16 exceeds random ordering by 14.345% and 14.098%. Longer windows retain additional diagnostic importance: Tail-32 improves over Tail-16 by 1.362% and 1.172%, while Tail-64 improves it by 2.024% and 1.764%. Recall alone thus favors increasing the window, so the default must also account for the cost of computing that score.
The gray curve makes this cost explicit. On 8K, the standalone score kernel takes 16.705, 16.739, 18.606, and 43.291 microseconds per layer for Tail-8, Tail-16, Tail-32, and Tail-64, respectively. Tail-16 recovers

(b) Illustrative 128K scores
Figure 10 Tail-window ranking quality, scan cost, and illustrative task scores. Left: change in retained non-anchor dense-decode importance mass relative to Tail-16 on 130 stratified 8K requests per model, with task-stratified paired 95% bootstrap confidence intervals. Pair-tier assignments, exact per-pair keep counts, and anchors are fixed to Tail-16. The gray curve reports standalone score-kernel latency per layer at 8K. Right: illustrative 128K score curves. The shaded bands highlight the default Tail-16 window in both panels.
more importance than Tail-8 at nearly the same scan cost; Tail-64 costs approximately as much as Tail-16. These timings measure a standalone reread of the materialized U tensor. In the production pipeline, the Tail-16 reduction is fused into Intra while the final 16-token tile is resident on chip. Both Tail-8 and Tail-16 fit in this tile, whereas Tail-32 and Tail-64 require accumulation across earlier tiles. Thus the independent scan measurements characterize score cost, rather than a measured GDN-core speedup between window choices.
In this plotted comparison, Tail-16 reaches 95.413% and 96.310% for 4B and 9B, respectively, matching Table 1. Relative to the illustrative Tail-8 values of 95.151% and 96.141%, the plotted increases are 0.262% and 0.169%, respectively. Extending the window beyond 16 tokens does not improve both models consistently: Tail-32 increases the 4B score to 95.508%, but lowers the 9B score to 96.208%; Tail-64 reaches 95.290% and 96.349%, respectively, at substantially higher scan cost. These illustrative comparisons do not establish statistical significance.
We therefore retain Tail-16 as the default. It captures more diagnostic importance than Tail-8 at nearly the same standalone score cost and fits the final tile already used by the fused Intra kernel. Longer windows provide additional recall but require more score accumulation, and the task-score curves offer no consistent advantage that grows with window length. Tail-16 is a practical balance between ranking quality and execution cost, rather than the window with the highest recall or the highest score for every model.
3.6 Kernel-Pipeline Ablations
Table 6 evaluates the execution mechanisms that reduce GPU stage latency under the same retained masks and group-local output rule. Each optimization is compared with a reference matched to its producer and consumer formats. On the benchmark inputs, all variants match the production retained masks across all 24 GDN layers and produce bitwise-identical prefill logits at the last input token.
The Deferred-W comparison replaces full W materialization with deferred materialization for retained events, including the associated packed-W consumer path. The CSR reference performs recurrent GEMMs at every chunk while preserving the same event mask, prefix-gap decay arithmetic, and compact output layout; the
Table 6 Kernel-pipeline ablations at batch size one on a GPU. Speedup is the ratio of reference to optimized median latency over the stages listed in Scope. Each variant uses five warmup forwards and 30 interleaved CUDA-event measurements. Within each measurement, the indicated stage times are summed across all 24 GDN layers before computing the median across measurements. Separately timed Selector work is excluded; statistics fused into Intra remain included. Geomean is the geometric mean of speedups over the six lengths from 4K to 128K; the 128K column reports the longest-context result. Each row uses its own reference, so the isolated speedups should not be multiplied. Compact+mapped reports the joint effect of compact state storage and mapped output reads.
| Optimization | Scope | Qwen3.5-4B | Qwen3.5-9B | ||
|---|---|---|---|---|---|
| Geomean | 128K | Geomean | 128K | ||
| Deferred-W | Intra+H+O | 1.336× | 1.390× | 1.338× | 1.391× |
| CSR event scan | H | 1.149× | 1.226× | 1.153× | 1.230× |
| Compact states | H | 1.398× | 1.406× | 1.402× | 1.405× |
| Tier scheduling | H | 1.029× | 1.044× | 1.030× | 1.045× |
| Mapped O | O | 1.239× | 1.374× | 1.226× | 1.368× |
| Compact + mapped | Intra+H+O | 1.226× | 1.285× | 1.224× | 1.283× |
optimized kernel scans only retained events. The compact-state comparison measures the cost of explicitly expanding compact event states into dense group-entry states after CSR propagation, with mapped O fixed in both variants.
For the isolated mapped-O comparison, both variants materialize the same dense group-entry states in H, and only O is timed. The reference reads these materialized states, whereas mapped O reconstructs them from compact event snapshots. Both output paths evaluate the two-chunk local reads in Section 2.7, including the contribution of a dropped even chunk. The joint Compact+mapped comparison also removes dense-state materialization and measures the combined effect over Intra+H+O.
Compact states yield geometric-mean H-stage speedups of approximately 1.40×, while deferred W yields approximately 1.34× over Intra+H+O. At 128K, CSR event scanning and mapped output reconstruction reach approximately 1.23× and 1.37×, respectively. Tier-aware scheduling is enabled at 16K and above, where it provides 1.04–1.05× speedups. At 4K and 8K, both scheduling variants use the same execution path; these lengths are also included in the geometric means reported in the table.
The similar ablation trends across the two models are consistent with their shared 24-layer GDN geometry. These results show that reducing update materialization and state traffic contributes to the measured speedups alongside sparse recurrent execution.
3.7 Peak-Memory Scaling
We measure peak allocated memory during complete-model BF16 prefill with batch size one, use_cache=True, and logits retained only for the last input token (logits_to_keep=1). We use the same repeated-or-truncated RULER prompt from 4K through 256K. Each configuration uses one warmup forward followed by three measured forwards. Before each measurement, we release unused cached allocator blocks and reset the peak-memory statistics. For completed configurations, we report the maximum across the three measurements.
Figure 11 shows the peak-memory curves, while Table 7 reports the 128K and 256K results. The forward increment is , where is the allocation already live immediately before the forward. This subtraction excludes persistent allocations such as model weights from the incremental measurement.
At 128K, SPARSEGDN reduces the absolute peak from 53.116 to 26.894 GB for Qwen3.5-4B and from 64.066 to 37.844 GB for Qwen3.5-9B. Both models save 26.222 GB, consistent with their shared GDN tensor geometry. The corresponding forward-increment reductions are 59.56% and 57.97%, respectively.
Across all completed Native comparisons from 4K to 128K, the forward increment decreases by 58.36%–59.56% for 4B and 56.83%–57.97% for 9B. At the models' configured maximum context length of 256K, both native FLA runs encounter OOM during warmup, whereas SPARSEGDN completes with absolute allocated peaks of

Figure 11 Complete-model prefill peak allocated memory across context lengths. Measurements use BF16, batch size one, use_cache=True. The shaded region shows the absolute memory saved by SPARSEGDN wherever both paths complete. The dashed line marks the nominal 80 GB device capacity as a reference. Crosses indicate Native OOM at 256K and are placed on this reference line for display; they do not represent measured allocation peaks. SPARSEGDN completes at that length for both models. Lower is better.
Table 7 Complete-model prefill peak allocated memory. “Incr.” denotes the peak allocation above memory already live at forward entry. “Incr. reduction” is the relative decrease in this increment, computed from unrounded values. Native OOMs during its first 256K warmup, so no completed-forward peak or increment is available. Lower is better.
| Model | Length | Native peak | Sparse peak | Native incr. | Sparse incr. | Incr. reduction |
|---|---|---|---|---|---|---|
| 4B | 128K | 53.116 | 26.894 | 44.027 | 17.804 | 59.56% |
| 9B | 128K | 64.066 | 37.844 | 45.235 | 19.012 | 57.97% |
| 4B | 256K | OOM | 44.637 | OOM | 35.544 | — |
| 9B | 256K | OOM | 56.794 | OOM | 37.960 | — |
44.637 and 56.794 GB for 4B and 9B, respectively. These 256K results establish prefill feasibility under the tested configuration; they do not provide quantitative Native peak-memory comparisons.
4 Conclusion and Limitations
We presented SPARSEGDN, a hardware-aware framework that accelerates long-context GDN prefill by combining a block-adjacent intra-chunk approximation with input-dependent recurrent-event selection and a co-designed sparse GPU pipeline. Deferred update materialization, CSR-based state propagation, compact event states, and mapped output reconstruction translate approximately 71% recurrent-event sparsity into 1.50-1.94× GDN-core speedups on Qwen3.5-4B and Qwen3.5-9B, while preserving comparable aggregate RULER accuracy from 4K to 128K tokens.
The main limitation lies in the selector: it relies on hand-designed tail, lifetime, and output-gate statistics, chooses among fixed retention tiers, and shares each decision across an adjacent value-head pair. Although this design is efficient and performs well in our experiments, it is not learned end to end and may miss rare but important state transitions or require recalibration for different models, tasks, and data distributions. Evaluation is also limited to RULER, whose largely controlled retrieval and reasoning tasks do not fully represent open-ended generation or real application workloads; moreover, aggregate scores can conceal regressions on individual tasks or context lengths. Broader validation on complementary long-context benchmarks and deployment traces is therefore needed.
5 Related Work
5.1 Efficient Long-Context Modeling
The quadratic cost of self-attention has motivated recurrence, structured sparsity, low-rank projection, hashing, routing, and kernelized approximations [3, 7–9, 24, 39, 53, 54, 63]. Long Range Arena benchmarks several families of efficient sequence models [51]. Complementary systems work accelerates exact attention through IO-aware kernels [10, 12, 41] and distributes attention computation across devices [4, 29]. MInference identifies attention-head sparsity patterns offline and constructs sparse indices dynamically during prefill [22]. Native Sparse Attention uses a trainable hierarchical sparsity pattern, while SpargeAttention applies online filtering at inference time [62, 64]. SPARSEGDN targets recurrent head-pair-chunk events within pretrained GDNs while producing outputs for every token.
5.2 Linear Attention and Recurrent Models
Linear attention admits a recurrent form and can be interpreted as a fast-weight memory [23, 40]. Gated Linear Attention, parallel Delta-rule algorithms, and Gated Delta Networks improve the selectivity and hardware efficiency of this family [57–59]. DeltaProduct improves state tracking through products of Householder updates, while FG²-GDN extends the scalar Delta-rule learning rate to channel-wise control [44, 48].
S4, S5, S4D, and the Linear Recurrent Unit explore structured or diagonal recurrent dynamics [19, 20, 35, 45]. H3, Hyena, RetNet, RWKV, Mamba, and Mamba-2 further explore state-space, convolutional, and recurrent sequence models [11, 16, 18, 36, 37, 49]. Griffin, Jamba, and Samba combine recurrent or state-space layers with attention, with Jamba also incorporating mixture-of-experts layers [13, 26, 38]. xLSTM revisits gated recurrent memory, while MEGA combines moving-average representations with gated attention [1, 34]. SPARSEGDN focuses on approximating and sparsely executing an existing GDN prefill operator without retraining.
5.3 Dynamic Sparsity and Cache Selection
Skip RNN learns to omit redundant recurrent updates [6]. Mixture-of-experts models route tokens to subsets of parameters and rely on efficient sparse execution [14, 17, 27, 42]. Deja Vu and PowerInfer exploit input-dependent activation sparsity [32, 46], while SparseGPT and Wanda prune model weights [15, 47]. SPARSEGDN applies input-dependent sparsity to recurrent events at the head-pair-chunk level while keeping pretrained parameters fixed.
H2O, Scissorhands, and SnapKV select cached tokens using attention-derived importance [28, 31, 65]. StreamingLLM retains attention sinks and recent tokens [55]; PyramidKV allocates layer-wise cache budgets, Quest selects query-relevant pages, and KIVI quantizes cached tensors [5, 33, 50]. DuoAttention separates retrieval and streaming heads [56]. RocketKV combines permanent KV-cache eviction with subsequent fine-grained sparse attention [2], while ChunkKV retains chunks of cached tokens to preserve local semantic structure [30]. These methods reduce the cost of storing or accessing attention KV caches. SPARSEGDN skips selected recurrent updates and reduces intermediate-state traffic during prefill while producing outputs for every token.
5.4 Systems Design
PagedAttention and FlexGen improve serving efficiency through KV-memory management and tensor placement, respectively [25, 43]. FlashInfer provides a customizable attention engine for LLM serving [61]. Triton and SparseTIR provide abstractions for dense tiled and sparse GPU kernels [52, 60]. SPARSEGDN couples event selection with deferred update materialization, compact state storage, and mapped output reads to reduce both recurrent computation and state traffic.
References
[1] Maximilian Beck, Korbinian Pöppel, Markus Spanring, Andreas Auer, Oleksandra Prudnikova, Michael Kopp, Günter Klambauer, Johannes Brandstetter, and Sepp Hochreiter. xLSTM: Extended long short-term memory. In Advances in Neural Information Processing Systems, volume 37, pages 107547–107603, 2024.
[2] Payman Behnam, Yaosheng Fu, Ritchie Zhao, Po-An Tsai, Zhiding Yu, and Alexey Tumanov. RocketKV: Accelerating long-context LLM inference via two-stage KV cache compression. In Proceedings of the 42nd International Conference on Machine Learning, volume 267 of Proceedings of Machine Learning Research, pages 3358–3392. PMLR, 2025.
[3] Iz Beltagy, Matthew E. Peters, and Arman Cohan. Longformer: The long-document transformer. CoRR, abs/2004.05150, 2020.
[4] William Brandon, Aniruddha Nrusimha, Kevin Qian, Zachary Ankner, Tian Jin, Zhiye Song, and Jonathan Ragan-Kelley. Striped attention: Faster ring attention for causal transformers. CoRR, abs/2311.09431, 2023. doi: 10.48550/arXiv.2311.09431.
[5] Zefan Cai, Yichi Zhang, Bofei Gao, Yuliang Liu, Yucheng Li, Tianyu Liu, Keming Lu, Wayne Xiong, Yue Dong, Junjie Hu, and Wen Xiao. PyramidKV: Dynamic KV cache compression based on pyramidal information funneling. In Second Conference on Language Modeling, 2025.
[6] Victor Campos, Brendan Jou, Xavier Giró-i-Nieto, Jordi Torres, and Shih-Fu Chang. Skip RNN: Learning to skip state updates in recurrent neural networks. In International Conference on Learning Representations, 2018.
[7] Rewon Child, Scott Gray, Alec Radford, and Ilya Sutskever. Generating long sequences with sparse transformers. CoRR, abs/1904.10509, 2019.
[8] Krzysztof Marcin Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song, Andreea Gane, Tamás Sarlós, Peter Hawkins, Jared Quincy Davis, Afroz Mohiuddin, Lukasz Kaiser, David Benjamin Belanger, Lucy J. Colwell, and Adrian Weller. Rethinking attention with Performers. In International Conference on Learning Representations, 2021.
[9] Zihang Dai, Zhilin Yang, Yiming Yang, Jaime G. Carbonell, Quoc Viet Le, and Ruslan Salakhutdinov. Transformer-XL: Attentive language models beyond a fixed-length context. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 2978–2988. Association for Computational Linguistics, 2019. doi: 10.18653/v1/p19-1285.
[10] Tri Dao. FlashAttention-2: Faster attention with better parallelism and work partitioning. In International Conference on Learning Representations, 2024.
[11] Tri Dao and Albert Gu. Transformers are SSMs: Generalized models and efficient algorithms through structured state space duality. In Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, pages 10041–10071. PMLR, 2024.
[12] Tri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra, and Christopher Ré. FlashAttention: Fast and memory-efficient exact attention with IO-awareness. In Advances in Neural Information Processing Systems, volume 35, pages 16344–16359, 2022.
[13] Soham De, Samuel L. Smith, Anushan Fernando, Aleksandar Botev, George-Cristian Muraru, Albert Gu, Ruba Haroun, Leonard Berrada, Yutian Chen, Srivatsan Srinivasan, Guillaume Desjardins, Arnaud Doucet, David Budden, Yee Whye Teh, Razvan Pascanu, Nando de Freitas, and Caglar Gulcehre. Griffin: Mixing gated linear recurrences with local attention for efficient language models. CoRR, abs/2402.19427, 2024. doi: 10.48550/arXiv.2402.19427.
[14] William Fedus, Barret Zoph, and Noam Shazeer. Switch transformers: Scaling to trillion parameter models with simple and efficient sparsity. J. Mach. Learn. Res., 23:120:1–120:39, 2022.
[15] Elias Frantar and Dan Alistarh. SparseGPT: Massive language models can be accurately pruned in one-shot. In Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pages 10323–10337. PMLR, 2023.
[16] Daniel Y. Fu, Tri Dao, Khaled Kamal Saab, Armin W. Thomas, Atri Rudra, and Christopher Ré. Hungry hungry hippos: Towards language modeling with state space models. In International Conference on Learning Representations, 2023.
[17] Trevor Gale, Deepak Narayanan, Cliff Young, and Matei Zaharia. MegaBlocks: Efficient sparse training with mixture-of-experts. In Proceedings of Machine Learning and Systems, volume 5, pages 288–304, 2023.
[18] Albert Gu and Tri Dao. Mamba: Linear-time sequence modeling with selective state spaces. In First Conference on Language Modeling, 2024.
[19] Albert Gu, Karan Goel, Ankit Gupta, and Christopher Ré. On the parameterization and initialization of diagonal state space models. In Advances in Neural Information Processing Systems, volume 35, pages 35971–35983, 2022.
[20] Albert Gu, Karan Goel, and Christopher Ré. Efficiently modeling long sequences with structured state spaces. In International Conference on Learning Representations, 2022.
[21] Cheng-Ping Hsieh, Simeng Sun, Samuel Kriman, Shantanu Acharya, Dima Rekesh, Fei Jia, and Boris Ginsburg. RULER: What's the real context size of your long-context language models? In First Conference on Language Modeling, 2024.
[22] Huiqiang Jiang, Yucheng Li, Chengruidong Zhang, Qianhui Wu, Xufang Luo, Surin Ahn, Zhenhua Han, Amir H. Abdi, Dongsheng Li, Chin-Yew Lin, Yuqing Yang, and Lili Qiu. MInference 1.0: Accelerating pre-filling for long-context LLMs via dynamic sparse attention. In Advances in Neural Information Processing Systems, volume 37, pages 52481–52515, 2024.
[23] Angelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, and François Fleuret. Transformers are RNNs: Fast autoregressive transformers with linear attention. In Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pages 5156–5165. PMLR, 2020.
[24] Nikita Kitaev, Lukasz Kaiser, and Anselm Levskaya. Reformer: The efficient transformer. In International Conference on Learning Representations, 2020.
[25] Woosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng, Lianmin Zheng, Cody Hao Yu, Joseph Gonzalez, Hao Zhang, and Ion Stoica. Efficient memory management for large language model serving with PagedAttention. In Proceedings of the 29th Symposium on Operating Systems Principles, pages 611–626. ACM, 2023. doi: 10.1145/3600006.3613165.
[26] Barak Lenz, Opher Lieber, Alan Arazi, Amir Bergman, Avshalom Manevich, Barak Peleg, Ben Aviram, Chen Almagor, Clara Fridman, Dan Padnos, Daniel Gissin, Daniel Jannai, Dor Muhlgay, Dor Zimberg, Edden M. Gerber, Elad Dolev, Eran Krakovsky, Erez Safahi, Erez Schwartz, Gal Cohen, Gal Shachaf, Haim Rozenblum, Hofit Bata, Ido Blass, Inbal Magar, Itay Dalmedigos, Jhonathan Osin, Julie Fadlon, Maria Rozman, Matan Danos, Michael Gokhman, Mor Zusman, Naama Gidron, Nir Ratner, Noam Gat, Noam Rozen, Oded Fried, Ohad Leshno, Omer Antverg, Omri Abend, Or Dagan, Orit Cohavi, Raz Alon, Ro'i Belson, Roi Cohen, Rom Gilad, Roman Glozman, Shahar Lev, Shai Shalev-Shwartz, Shaked Haim Meirom, Tal Delbari, Tal Ness, Tomer Asida, Tom Ben Gal, Tom Braude, Uriya Pumerantz, Josh Cohen, Yonatan Belinkov, Yuval Globerson, Yuval Peleg Levy, and Yoav Shoham. Jamba: Hybrid transformer-Mamba language models. In International Conference on Learning Representations, 2025.
[27] Dmitry Lepikhin, HyoukJoong Lee, Yuanzhong Xu, Dehao Chen, Orhan Firat, Yanping Huang, Maxim Krikun, Noam Shazeer, and Zhifeng Chen. GShard: Scaling giant models with conditional computation and automatic sharding. In International Conference on Learning Representations, 2021.
[28] Yuhong Li, Yingbing Huang, Bowen Yang, Bharat Venkitesh, Acyr Locatelli, Hanchen Ye, Tianle Cai, Patrick Lewis, and Deming Chen. SnapKV: LLM knows what you are looking for before generation. In Advances in Neural Information Processing Systems, volume 37, pages 22947–22970, 2024.
[29] Hao Liu, Matei Zaharia, and Pieter Abbeel. RingAttention with blockwise transformers for near-infinite context. In International Conference on Learning Representations, 2024.
[30] Xiang Liu, Zhenheng Tang, Peijie Dong, Zeyu Li, Yue Liu, Bo Li, Xuming Hu, and Xiaowen Chu. ChunkKV: Semantic-preserving KV cache compression for efficient long-context LLM inference. In Advances in Neural Information Processing Systems, volume 38, pages 28728–28778, 2025.
[31] Zichang Liu, Aditya Desai, Fangshuo Liao, Weitao Wang, Victor Xie, Zhaozhuo Xu, Anastasios Kyrillidis, and Anshumali Shrivastava. Scissorhands: Exploiting the persistence of importance hypothesis for LLM KV cache compression at test time. In Advances in Neural Information Processing Systems, volume 36, pages 52342–52364, 2023.
[32] Zichang Liu, Jue Wang, Tri Dao, Tianyi Zhou, Binhang Yuan, Zhao Song, Anshumali Shrivastava, Ce Zhang, Yuandong Tian, Christopher Ré, and Beidi Chen. Deja Vu: Contextual sparsity for efficient LLMs at inference time. In Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pages 22137–22176. PMLR, 2023.
[33] Zirui Liu, Jiayi Yuan, Hongye Jin, Shaochen (Henry) Zhong, Zhaozhuo Xu, Vladimir Braverman, Beidi Chen, and Xia Hu. KIVI: A tuning-free asymmetric 2bit quantization for KV cache. In Proceedings of the 41st International
Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, pages 32332–32344. PMLR, 2024.
[34] Xuezhe Ma, Chunting Zhou, Xiang Kong, Junxian He, Liangke Gui, Graham Neubig, Jonathan May, and Luke Zettlemoyer. Mega: Moving average equipped gated attention. In International Conference on Learning Representations, 2023.
[35] Antonio Orvieto, Samuel L. Smith, Albert Gu, Anushan Fernando, Çaglar Gülçehre, Razvan Pascanu, and Soham De. Resurrecting recurrent neural networks for long sequences. In Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pages 26670–26698. PMLR, 2023.
[36] Bo Peng, Eric Alcaide, Quentin Anthony, Alon Albalak, Samuel Arcadinho, Stella Biderman, Huanqi Cao, Xin Cheng, Michael Chung, Leon Derczynski, Xingjian Du, Matteo Grella, Kranthi Kiran GV, Xuzheng He, Haowen Hou, Przemysław Kazienko, Jan Kocon, Jiaming Kong, Bartlomiej Koptyra, Hayden Lau, Jiaju Lin, Krishna Sri Ipsit Mantri, Ferdinand Mom, Atsushi Saito, Guangyu Song, Xiangru Tang, Johan S. Wind, Stanislaw Wozniak, Zhenyuan Zhang, Qinghua Zhou, Jian Zhu, and Rui-Jie Zhu. RWKV: Reinventing RNNs for the transformer era. In Findings of the Association for Computational Linguistics: EMNLP 2023, pages 14048–14077. Association for Computational Linguistics, 2023. doi: 10.18653/v1/2023.findings-emnlp.936.
[37] Michael Poli, Stefano Massaroli, Eric Nguyen, Daniel Y. Fu, Tri Dao, Stephen Baccus, Yoshua Bengio, Stefano Ermon, and Christopher Ré. Hyena hierarchy: Towards larger convolutional language models. In Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pages 28043–28078. PMLR, 2023.
[38] Liliang Ren, Yang Liu, Yadong Lu, Yelong Shen, Chen Liang, and Weizhu Chen. Samba: Simple hybrid state space models for efficient unlimited context language modeling. In International Conference on Learning Representations, 2025.
[39] Aurko Roy, Mohammad Saffar, Ashish Vaswani, and David Grangier. Efficient content-based sparse attention with routing transformers. Trans. Assoc. Comput. Linguistics, 9:53–68, 2021. doi: 10.1162/tacl_a_00353.
[40] Imanol Schlag, Kazuki Irie, and Jürgen Schmidhuber. Linear transformers are secretly fast weight programmers. In Proceedings of the 38th International Conference on Machine Learning, volume 139 of Proceedings of Machine Learning Research, pages 9355–9366. PMLR, 2021.
[41] Jay Shah, Ganesh Bikshandi, Ying Zhang, Vijay Thakkar, Pradeep Ramani, and Tri Dao. FlashAttention-3: Fast and accurate attention with asynchrony and low-precision. In Advances in Neural Information Processing Systems, volume 37, pages 68658–68685, 2024.
[42] Noam Shazeer, Azalia Mirhoseini, Krzysztof Maziarz, Andy Davis, Quoc V. Le, Geoffrey E. Hinton, and Jeff Dean. Outrageously large neural networks: The sparsely-gated mixture-of-experts layer. In International Conference on Learning Representations, 2017.
[43] Ying Sheng, Lianmin Zheng, Binhang Yuan, Zhuohan Li, Max Ryabinin, Beidi Chen, Percy Liang, Christopher Ré, Ion Stoica, and Ce Zhang. FlexGen: High-throughput generative inference of large language models with a single GPU. In Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pages 31094–31116. PMLR, 2023.
[44] Julien Siems, Timur Carstensen, Arber Zela, Frank Hutter, Massimiliano Pontil, and Riccardo Grazzi. DeltaProduct: Improving state-tracking in linear RNNs via Householder products. In Advances in Neural Information Processing Systems, volume 38, pages 153738–153782, 2025.
[45] Jimmy T. H. Smith, Andrew Warrington, and Scott W. Linderman. Simplified state space layers for sequence modeling. In International Conference on Learning Representations, 2023.
[46] Yixin Song, Zeyu Mi, Haotong Xie, and Haibo Chen. PowerInfer: Fast large language model serving with a consumer-grade GPU. In Proceedings of the ACM SIGOPS 30th Symposium on Operating Systems Principles, pages 590–606. ACM, 2024. doi: 10.1145/3694715.3695964.
[47] Mingjie Sun, Zhuang Liu, Anna Bair, and J. Zico Kolter. A simple and effective pruning approach for large language models. In International Conference on Learning Representations, 2024.
[48] Pingwei Sun, Yuxuan Hu, Jianchao Tan, Xue Wang, Jiaqi Zhang, Yifan Lu, Yerui Sun, Yuchen Xie, and Xunliang Cai. FG -GDN: Enhancing long-context gated delta networks with doubly fine-grained control. doi: 10.48550/arXiv.2604.19021.
[49] Yutao Sun, Li Dong, Shaohan Huang, Shuming Ma, Yuqing Xia, Jilong Xue, Jianyong Wang, and Furu Wei. Retentive network: A successor to transformer for large language models. doi:10.48550/arXiv.2307.08621.
[50] Jiaming Tang, Yilong Zhao, Kan Zhu, Guangxuan Xiao, Baris Kasikci, and Song Han. QUEST: Query-aware sparsity for efficient long-context LLM inference. In Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, pages 47901–47911. PMLR, 2024.
[51] Yi Tay, Mostafa Dehghani, Samira Abnar, Yikang Shen, Dara Bahri, Philip Pham, Jinfeng Rao, Liu Yang, Sebastian Ruder, and Donald Metzler. Long Range Arena: A benchmark for efficient transformers. In , 2021.
[52] Philippe Tillet, Hsiang-Tsung Kung, and David D. Cox. Triton: an intermediate language and compiler for tiled neural network computations. In Proceedings of the 3rd ACM SIGPLAN International Workshop on Machine Learning and Programming Languages, pages 10–19. ACM, 2019. doi: 10.1145/3315508.3329973.
[53] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems, volume 30, pages 5998–6008, 2017.
[54] Sinong Wang, Belinda Z. Li, Madian Khabsa, Han Fang, and Hao Ma. Linformer: Self-attention with linear complexity.
[55] Guangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han, and Mike Lewis. Efficient streaming language models with attention sinks. In , 2024.
[56] Guangxuan Xiao, Jiaming Tang, Jingwei Zuo, Junxian Guo, Shang Yang, Haotian Tang, Yao Fu, and Song Han. DuoAttention: Efficient long-context LLM inference with retrieval and streaming heads. In , 2025.
[57] Songlin Yang, Bailin Wang, Yikang Shen, Rameswar Panda, and Yoon Kim. Gated linear attention transformers with hardware-efficient training. In Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, pages 56501–56523. PMLR, 2024.
[58] Songlin Yang, Bailin Wang, Yu Zhang, Yikang Shen, and Yoon Kim. Parallelizing linear transformers with the delta rule over sequence length. In Advances in Neural Information Processing Systems, volume 37, pages 115491–115522, 2024.
[59] Songlin Yang, Jan Kautz, and Ali Hatamizadeh. Gated delta networks: Improving Mamba2 with delta rule. In International Conference on Learning Representations, 2025.
[60] Zihao Ye, Ruihang Lai, Junru Shao, Tianqi Chen, and Luis Ceze. SparseTIR: Composable abstractions for sparse compilation in deep learning. In Proceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 3, pages 660–678. ACM, 2023. doi:10.1145/3582016.3582047.
[61] Zihao Ye, Lequn Chen, Ruihang Lai, Wuwei Lin, Yineng Zhang, Stephanie Wang, Tianqi Chen, Baris Kasikci, Vinod Grover, Arvind Krishnamurthy, and Luis Ceze. FlashInfer: Efficient and customizable attention engine for LLM inference serving. In Proceedings of Machine Learning and Systems, 2025.
[62] Jingyang Yuan, Huazuo Gao, Damai Dai, Junyu Luo, Liang Zhao, Zhengyan Zhang, Zhenda Xie, Yuxing Wei, Lean Wang, Zhiping Xiao, Yuqing Wang, Chong Ruan, Ming Zhang, Wenfeng Liang, and Wangding Zeng. Native sparse attention: Hardware-aligned and natively trainable sparse attention. In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 23078–23097. Association for Computational Linguistics, 2025. doi: 10.18653/v1/2025.acl-long.1126.
[63] Manzil Zaheer, Guru Guruganesh, Kumar Avinava Dubey, Joshua Ainslie, Chris Alberti, Santiago Ontañón, Philip Pham, Anirudh Ravula, Qifan Wang, Li Yang, and Amr Ahmed. Big Bird: Transformers for longer sequences. In Advances in Neural Information Processing Systems, volume 33, pages 17283–17297, 2020.
[64] Jintao Zhang, Chendong Xiang, Haofeng Huang, Jia Wei, Haocheng Xi, Jun Zhu, and Jianfei Chen. SpargeAttention: Accurate and training-free sparse attention accelerating any model inference. In Proceedings of the 42nd
International Conference on Machine Learning, volume 267 of Proceedings of Machine Learning Research, pages 76397–76413. PMLR, 2025.
[65] Zhenyu Zhang, Ying Sheng, Tianyi Zhou, Tianlong Chen, Lianmin Zheng, Ruisi Cai, Zhao Song, Yuandong Tian, Christopher Ré, Clark W. Barrett, Zhangyang Wang, and Beidi Chen. H2O: Heavy-hitter oracle for efficient generative inference of large language models. In Advances in Neural Information Processing Systems, volume 36, pages 34661–34710, 2023.