Gated DeltaNet (GDN) achieves linear computational complexity through recurrent state updates, but sequential dependencies between chunks limit parallelism, particularly for long-context workloads with small batch sizes or limited head-level parallelism per GPU. We present FlashQLA, a context-parallel execution framework for GDN that exposes additional sequence-level parallelism while reducing boundary-state preprocessing overhead. FlashQLA reduces boundary-state preprocessing overhead through decay-aware preparation and extends sequence parallelism across GPUs with Dual CP, which shares summary computation across parallelism levels. Workload-adaptive Auto CP and CP-aware kernel co-design further improve execution efficiency. FlashQLA achieves 1.7×-3.1× forward speedup and up to 4.4× backward speedup over Flash Linear Attention (FLA) on a single GPU. On eight GPUs with context lengths up to 1M tokens, Dual CP achieves up to 4.8× forward speedup and 4.4× speedup for combined forward and backward execution over FLA KCP.
Figures & tables
Figure 1: Head-wise decay window distribution. Fraction of heads with decay windows shorter than 1K, 2K, 8K, and 32K tokens across layers in Qwen3.8-27B and Qwen3.8-2.4T-A95B, evaluated on 32K-token sequences with TOL=e−10 . Overall, 66.9% and 80.7% of heads have decay windows shorter than 8K tokens in the two models, respectively, highlighting the prevalence of short decay windows.
Figure 2: Input dependence of head-wise decay windows. Estimated decay windows across 24 inputs for Qwen3.8-27B and Qwen3.8-2.4T-A95B. Curves show geometric means, with shaded regions indicating ±1 standard deviation in log space. Windows beyond 32K are extrapolated from measured gate values.
Figure 3: Overview of Dual CP. Intra-card partition summaries are computed once and aggregated into inter-card summaries, enabling shared summary computation and hierarchical boundary-state correction without duplicated preparation.
Figure 4: Preprocessing latency breakdown of Dual CP. Comparison with a naive combination of inter-card and intra-card CP on eight GPUs with a 1M-token sequence and 32 attention heads. Dual CP reduces total preprocessing latency from 8.617 ms to 1.907 ms ( 4.52× ). The upper-right panel magnifies the smaller aggregation and correction stages.
Figure 5: Single-GPU forward performance. Comparison of FlashQLA and FLA forward performance across model architectures, tensor-parallel configurations, and sequence lengths from 8K to 32K tokens. FlashQLA achieves 1.7× – 3.1× speedups, with larger gains at higher TP degrees and longer sequence lengths.
Figure 6: Single-GPU backward performance. Comparison of FlashQLA and FLA backward performance across model architectures and tensor-parallel configurations, using a fixed total of 32K tokens randomly distributed among 1, 2, 4, or 8 sequences. FlashQLA maintains stable latency across different sequence counts, while FLA becomes slower with fewer sequences. FlashQLA achieves over 2× speedup in most configurations, reaching up to 4.4× .
Seq. Length
FLA (ms)
FlashQLA (ms)
Speedup
32K
2.309
0.711
3.25×
64K
4.630
1.299
3.56×
Table 1: Real-model gated delta rule performance on Qwen3.8-2.4T-A95B. Average forward latency of the gated delta rule operator across GDN layers using real model activations and gate values under TP8.
Figure 7: Multi-GPU forward performance. Comparison of FLA KCP, FlashQLA KCP, naive KCP + intra-card CP, and FlashQLA Dual CP on eight GPUs across sequence lengths from 64K to 1M tokens and head counts of 16, 32, and 64. Dual CP avoids the duplicated preprocessing of naive composition and achieves the largest gains at low head counts, where additional intra-card parallelism is most beneficial. FlashQLA Dual CP achieves up to 4.8× speedup over FLA KCP.
Figure 8: Multi-GPU forward and backward performance. Combined forward-and-backward latency of four context-parallel implementations on eight GPUs. Intra-card CP provides greater benefits than in forward-only execution, while Dual CP further reduces preprocessing overhead through shared summary computation. FlashQLA Dual CP achieves up to 4.4× speedup over FLA KCP.
Figure 9: Multi-GPU forward-and-backward scaling. Relative speedup of FLA KCP and FlashQLA Dual CP across CP sizes of 1, 2, 4, and 8 GPUs, normalized to each implementation’s single-GPU latency. The evaluated configurations are H=16 with 1M tokens, H=32 with 512K tokens, and H=64 with 256K tokens. The dashed line ( y=x ) indicates ideal linear scaling.
Figure 10: Optimization breakdown of FlashQLA. Cumulative forward speedup relative to single-GPU FLA on GPUs with 16 heads and a 1M-token sequence. The stages progressively incorporate optimized kernels, intra-card CP with Auto CP, decay-aware preparation, and eight-GPU Dual CP.
Figure 11: Kernel latency-model accuracy. Model-predicted latency curves and measured latencies across candidate partition lengths for a variable-length workload with sequence lengths [512,2048,32768] and 32 heads, covering all four kernels.
Figure 12: Auto CP configuration-selection quality. Relative latency regret of Auto CP-selected configurations against the exhaustive-search oracle, plotted against workload latency across 90 workloads under inference (forward-only) and training (forward-and-backward) execution.
Figure 13: Performance benefit of Auto CP over static partitioning. Geometric-mean relative latency of fixed partitioning and a hardware-aware heuristic across sequence lengths for each head count, normalized to Auto CP. The left and right panels show forward-only and combined forward-and-backward execution, respectively. Auto CP achieves the lowest latency across all evaluated settings, with larger performance gains under inference.
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
Symbol
Description
Symbol
Description
General notation
C
Tokens per chunk
L
Chunks per sequence
B
Batch size
Lb
Chunks in sequence b
H
Number of heads
dk,dv
Key/value dimensions
t
Token index
c
Global chunk index
h
Head index
S0
Initial recurrent state
Appendix
Table 2: Notation for Gated DeltaNet context parallelism and boundary-state preprocessing.
Symbol
Description
Symbol
Description
Decay-aware preparation
γ[c],C,h
Chunk decay for head h
Dh(a,b)
Cumulative decay over [a,b]
TOL
Decay threshold
Kc,h
Decay window in chunks
Wc,h
Decay window in tokens
Kmax
Maximum truncated window
Ki
Boundary decay window
M[c]
Decay-normalized transition
ΔS[c]
State difference due to truncated history
S[li−1],Ki(i−1)
Truncated zero-state rollout
Appendix
Table 3: Notation for decay-aware preparation and Auto CP.
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.94x GDN-core prefill speedups over native FLA kernels, including online selection overhead.
Gated DeltaNet (GDN) is a linear attention mechanism that replaces the growing KV cache with a fixed-size recurrent state. Hybrid LLMs like Qwen3-Next use 75% GDN layers and achieve competitive accuracy to attention-only models. However, at batch-1, GDN decode is memory-bound on GPUs since the full recurrent state must be round-tripped through HBM every token. We show that this bottleneck is architectural, not algorithmic, as all subquadratic sequence models exhibit arithmetic intensities below 1 FLOP/B at decode time, making them more memory-bound than standard Transformers. We present an FPGA accelerator that eliminates this bottleneck by holding the full 2 MB recurrent state persistently in on-chip BRAM, converting the workload from memory-bound to compute-bound. Our design fuses the GDN recurrence into a five-phase pipelined datapath that performs only one read and one write pass over each state matrix per token, exploits Grouped Value Attention for paired-head parallelism, and overlaps preparation, computation, and output storage via dataflow pipelining. We explore four design points on an AMD Alveo U55C using Vitis HLS, varying head-level parallelism from 2 to 16 value-heads per iteration. Our fastest configuration achieves 63 μs per token, 4.5× faster than the GPU reference on NVIDIA H100 PCIe. Post-implementation power analysis reports 9.96 W on-chip, yielding up to 60× greater energy efficiency per token decoded.
Neelesh Gupta, Peter Wang, Rajgopal Kannan +1
University of Southern California, USA · DEVCOM Army Research Office, USA
Linear Attention (LA) offers a promising paradigm for scaling large language models (LLMs) to long sequences by avoiding the quadratic complexity of self-attention. Recent LA models such as Mamba2 and GDN interpret linear recurrences as closed-form online stochastic gradient descent (SGD), but naive SGD updates suffer from rapid information decay and suboptimal convergence in optimization. While momentum-based optimizers provide a natural remedy, they pose challenges in simultaneously achieving training efficiency and effectiveness. To address this, we develop a chunkwise parallel algorithm for LA with a stepwise momentum rule by geometrically reordering the update coefficients. Further, from a dynamical systems perspective, we analyze the momentum-based recurrence as a second-order system that introduces complex conjugate eigenvalues. This analysis guides the design of stable gating constraints. The resulting model, Momentum DeltaNet (MDN), leverages Triton kernels to achieve comparable training throughput with competitive linear models such as Mamba2 and KDA. Extensive experiments on the 400M and 1.3B parameter models demonstrate consistent performance improvements over strong baselines, including Transformers, Mamba2 and GDN, across diverse downstream evaluation benchmarks. Code: https://github.com/HuuYuLong/MomentumDeltaNet .
Yulong Huang, Xiang Liu, Hongxiang Huang +5
The Hong Kong University of Science and Technology (Guangzhou), Guangzhou, China