FlashQLA: Efficient Context Parallelism for Gated DeltaNet

Xi Lin, Chengruidong Zhang, Huiqiang Jiang, Xiao Li, Zekun Wang, Junda Feng, Yunfei Mao, Siqi Zhang, Siyu Wang, Man Yuan, Rui Men, Bo Zheng, Dayiheng Liu, Bohan Zhuang, Jianwei ZhangarXiv 2026

TL;DR

Linear attention models like Gated DeltaNet promise to process million-token sequences without the crushing quadratic cost of standard Transformers, but they hide a frustrating secret: their step-by-step memory updates refuse to parallelize easily across GPUs. FlashQLA breaks this sequential bottleneck by realizing that most attention heads "forget" old context rapidly, allowing GPUs to chop up long sequences, skip redundant memory prep work, and process million-token contexts up to 4.8× faster.

What Problem Does This Paper Address?

Standard softmax attention compares every token to every other token—great for parallelizing on GPUs, terrible for scaling to long contexts. Gated DeltaNet (GDN) replaces this with linear attention, compressing past tokens into a fixed-size recurrent state (a running memory matrix) updated as the model reads.

To make GDN fast on GPUs, tokens are grouped into small chunks. Within a chunk, math happens in parallel. Between chunks, however, we hit a sequential wall: Chunk 2 needs the final memory state of Chunk 1. When processing a 1-million-token sequence with a small batch size, GPU cores sit idle waiting on this long chain of dependencies.

Context Parallelism (CP) tries to fix this by slicing the sequence into partitions and processing them simultaneously. Because each partition starts "blind" (without the true incoming state from earlier tokens), standard methods like Kimi Context Parallel (KCP) run a two-step boundary-state preprocessing phase: each partition computes a local state summary assuming a blank-slate start, and then a quick sequential pass stitches them together. The catch? Computing those local summaries requires scanning every chunk in the partition—eating up 50.8% of total forward execution time and neutralizing half the gains of parallelization!

Methods

FlashQLA attacks both the preprocessing tax and hardware underutilization through four main innovations:

  • Decay-Aware Preparation: GDN uses a data-dependent "decay gate" ($\alpha \in (0,1)$) to forget old information. Instead of scanning an entire partition to prepare boundary states, FlashQLA checks each head's cumulative decay online. If a head forgets rapidly, FlashQLA truncates the prep rollout to just the tail end of the partition where history still matters mathematically, retaining full-history rollouts only for long-memory heads.
  • Auto CP: Finer sequence slicing creates more parallelism, but adds scheduling and stitching overhead. Auto CP uses a lightweight offline-calibrated latency proxy model and searches around GPU execution-wave boundaries to dynamically decide if intra-GPU slicing helps a given workload, and picks the optimal partition size.
  • Dual CP: When scaling across multiple GPUs (inter-card) and slicing sequences within each GPU (intra-card), naively combining them duplicates the state-summary prep work. Dual CP computes summaries once at the fine-grained intra-card level, algebraically aggregates them into inter-card summaries, exchanges them across GPUs, and corrects states hierarchically.
  • Kernel Co-Design: Using TileLang, the authors factor cumulative decay gates out of matrix inverses (preventing low-precision rounding errors while keeping accumulators in FP32), fuse compatible kernel stages, and use manual warp specialization to overlap memory transfers with matrix math.

Datasets

Because FlashQLA is an execution framework rather than a newly trained model, no training datasets are used. Evaluation relies on two sources:

  1. Synthetic Benchmarks: Randomly generated BFloat16 inputs across sequence lengths from 8K to 1M tokens. Reflecting real-world observations, 75% of heads are configured with strong decay and 25% with weak decay.
  2. Real-Model Activations: Actual activations and gate values collected from Qwen3.8-27B and Qwen3.8-2.4T-A95B (Max) executions (24 sequences of 32K tokens for decay profiling, plus 32K and 64K contexts for operator benchmarking). No new public dataset benchmarks are introduced.

Key Insights and Ideas

  • Most linear attention heads have surprisingly short memories: When measuring how quickly historical state decays below $e^{-10}$, the authors found that 66.9% of heads in Qwen3.8-27B and 80.7% in Qwen3.8-Max have effective memory windows shorter than 8K tokens. We don't need to summarize 100K tokens of history for a head that forgets everything past 2K tokens.
Prevalence of short decay windows across GDN layers in Qwen3.8 models.
  • Head decay is a personality trait with situational moods: Individual heads consistently favor short or long windows, yet exact window sizes shift depending on the input text—justifying FlashQLA's choice to estimate truncation windows dynamically online rather than hardcoding them.
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.
  • Affine math makes hierarchy cheap: Because GDN's state update is affine ($S_{new} = M \cdot S_{old} + E$), local chunk transitions compose cleanly via matrix multiplication. That algebraic property is what lets Dual CP build multi-GPU summaries directly out of single-GPU sub-summaries—slashing preprocessing latency by 4.52×.

Key Results

Compared against Flash Linear Attention (FLA) and FLA's KCP implementation:

  • Single-GPU Speedups: Achieves 1.7×–3.1× forward speedup (8K–32K tokens) and up to 4.4× backward speedup. On real Qwen3.8-2.4T-A95B activations under TP8, GDN operator forward latency drops by 3.25× (32K) and 3.56× (64K).
  • Multi-GPU Scaling (8 GPUs, up to 1M tokens): Dual CP delivers up to 4.8× forward speedup and 4.4× combined forward-and-backward speedup over FLA KCP.
  • Auto CP Precision: Picks the true optimal configuration 94.4% of the time for inference and 90.0% for training, outperforming hardware-aware static heuristics by up to 3×.
  • End-to-End Impact: Reduces full-model Time-To-First-Token (TTFT) on Qwen3.8-2.4T-A95B (32K context, TP8) by ~5%.

Limitations and Future Work

  • Modest End-to-End Gains at Moderate Contexts: In hybrid architectures like Qwen3.8, GDN computation only accounts for a small slice of total runtime at 32K tokens, capping end-to-end TTFT improvement at ~5%.
  • Approximation Error: Truncating state preparation introduces a tiny numerical approximation controlled by the threshold $\text{TOL} = e^{-10}$ (though accurate in practice).
  • Architecture Scope & Future Directions: FlashQLA specifically targets Gated DeltaNet's scalar per-head gates. However, the authors note that their affine-summary framework provides a clear foundation for extending hierarchical context parallelism to other recurrent linear-attention variants, such as Kimi Delta Attention (KDA) with channel-wise decay gates.

Summary updated

Abstract

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\times$-$3.1\times$ forward speedup and up to $4.4\times$ 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\times$ forward speedup and $4.4\times$ speedup for combined forward and backward execution over FLA KCP.
BibTeX
@misc{lin2026flashqla,
  author = {Xi Lin and Chengruidong Zhang and Huiqiang Jiang and Xiao Li and Zekun Wang and Junda Feng and Yunfei Mao and Siqi Zhang and Siyu Wang and Man Yuan and Rui Men and Bo Zheng and Dayiheng Liu and Bohan Zhuang and Jianwei Zhang},
  title = {{FlashQLA: Efficient Context Parallelism for Gated DeltaNet}},
  year = {2026},
  eprint = {2611.32039},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.32039},
}
Figure