mlsanityData to 7 Oct 2026

Flux Attention: Context-Aware Hybrid Attention for Efficient LLMs Inference

arXiv 2604.07394 ↗First posted 8 Apr 2026cs.LG cs.CLcited by 0

Not on the map. Why?

Abstract (arXiv)

The quadratic computational complexity of standard attention mechanisms presents a severe scalability bottleneck for LLMs in long-context scenarios. While hybrid attention mechanisms combining Full Attention (FA) and Sparse Attention (SA) offer a potential solution, existing methods typically rely on static allocation ratios that fail to accommodate the variable retrieval demands of different tasks. Furthermore, head-level dynamic sparsity often introduces severe computational load imbalance and synchronization long-tails, which hinder hardware acceleration during autoregressive decoding. To bridge this gap, we introduce Flux Attention, a context-aware framework that dynamically optimizes attention computation at the layer level. By integrating a lightweight Layer Router into frozen pretrained LLMs, the proposed method adaptively routes each layer to FA or SA based on the input context. This layer-wise routing preserves high-fidelity information retrieval while ensuring contiguous memory access, translating theoretical computational reductions into practical wall-clock speedups. As a parameter-efficient approach, our framework requires only 12 hours of training on 8×A800 GPUs. Extensive experiments across multiple long-context and mathematical reasoning benchmarks demonstrate that Flux Attention achieves a superior trade-off between performance and inference speed compared with baseline models, with speed improvements of up to 2.8× and 2.0× in the prefill and decode stages.

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 49 of its 56 references that are in the map. First posted on arXiv 8 Apr 2026.

Builds on

49 of 56 references.

References · 49

  1. 2017Attention Is All You Needcited by 59,932
  2. 2024The Llama 3 Herd of Modelscited by 14,192
  3. 2021Training Verifiers to Solve Math Word Problemscited by 9,743
  4. 2017Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layercited by 3,413
  5. 2020Longformer: The Long-Document Transformercited by 3,362
  6. 2021Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsitycited by 3,014
  7. 2016Categorical Reparameterization with Gumbel-Softmaxcited by 2,708
  8. 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
  9. 2020Big Bird: Transformers for Longer Sequencescited by 1,673
  10. 2019Generating Long Sequences with Sparse Transformerscited by 1,523
  11. 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,378
  12. 2018Don't Give Me the Details, Just the Summary! Topic-Aware Convolutional Neural Networks for Extreme Summarizationcited by 1,308
37 more
  1. 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,270
  2. 2021MuSiQue: Multihop Questions via Single-hop Question Compositioncited by 893
  3. 2024SnapKV: LLM Knows What You are Looking for Before Generationcited by 848
  4. 2023H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Modelscited by 805
  5. 2024Quest: Query-Aware Sparsity for Efficient Long-Context LLM Inferencecited by 487
  6. 2023Scissorhands: Exploiting the Persistence of Importance Hypothesis for LLM KV Cache Compression at Test Timecited by 428
  7. 2025Native Sparse Attention: Hardware-Aligned and Natively Trainable Sparse Attentioncited by 391
  8. 2024MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attentioncited by 375
  9. 2024LongBench v2: Towards Deeper Understanding and Reasoning on Realistic Long-context Multitaskscited by 367
  10. 2021Efficient Attentions for Long Document Summarizationcited by 342
  11. 2024DuoAttention: Efficient Long-Context LLM Inference with Retrieval and Streaming Headscited by 283
  12. 2024Mixture-of-Depths: Dynamically allocating compute in transformer-based language modelscited by 242
  13. 2024Retrieval Head Mechanistically Explains Long-Context Factualitycited by 219
  14. 2024Samba: Simple Hybrid State Space Models for Efficient Unlimited Context Language Modelingcited by 167
  15. 2025XAttention: Block Sparse Attention with Antidiagonal Scoringcited by 131
  16. 2024SeerAttention: Learning Intrinsic Sparse Attention in Your LLMscited by 121
  17. 2025FlexPrefill: A Context-Aware Sparse Attention Mechanism for Efficient Long-Sequence Inferencecited by 121
  18. 2025A Survey of Context Engineering for Large Language Modelscited by 120
  19. 2025A Comprehensive Survey on Long Context Language Modelingcited by 113
  20. 2024ChatQA 2: Bridging the Gap to Proprietary LLMs in Long Context and RAG Capabilitiescited by 52
  21. 2025InfLLM-V2: Dense-Sparse Switchable Attention for Seamless Short-to-Long Adaptationcited by 31
  22. 2025Inference-Time Hyper-Scaling with KV Cache Compressioncited by 28
  23. 2026SLA2: Sparse-Linear Attention with Learnable Routing and QATcited by 21
  24. 2023Sparse Modular Activation for Efficient Sequence Modelingcited by 20
  25. 2024UNComp: Can Matrix Entropy Uncover Sparsity? -- A Compressor Design from an Uncertainty-Aware Perspectivecited by 14
  26. 2025Systems and Algorithms for Convolutional Multi-Hybrid Language Models at Scalecited by 12
  27. 2024LightTransfer: Your Long-Context LLM is Secretly a Hybrid Model with Effortless Adaptationcited by 11
  28. 2025Cache Me If You Can: How Many KVs Do You Need for Effective Long-Context LMs?cited by 10
  29. 2025Efficient Context Scaling with LongCat ZigZag Attentioncited by 6
  30. 2025LOOM-Scope: a comprehensive and efficient LOng-cOntext Model evaluation frameworkcited by 5
  31. 2025Sparser Block-Sparse Attention via Token Permutationcited by 5
  32. 2026LycheeDecode: Accelerating Long-Context LLM Inference via Hybrid-Head Sparse Decodingcited by 5
  33. 2025Accelerating Prefilling for Long-Context LLMs via Sparse Pattern Sharingcited by 4
  34. 2025Accelerating Prefilling via Decoding-time Contribution Sparsitycited by 4
  35. 2026Elastic Attention: Test-time Adaptive Sparsity Ratios for Efficient Transformerscited by 4
  36. 2026Scout Before You Attend: Sketch-and-Walk Sparse Attention for Efficient LLM Inferencecited by 4
  37. 2025SALE : Low-bit Estimation for Efficient Sparse Attention in Long-context LLM Prefillingcited by 3

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2025Kascade: A Practical Sparse Attention Method for Long-Context LLM Inference
  2. 2025Tactic: Adaptive Sparse Attention with Clustering and Distribution Fitting for Long-Context LLMs
  3. 2026SparDA: Sparse Decoupled Attention for Efficient Long-Context LLM Inference
  4. 2026You Only Index Once: Cross-Layer Sparse Attention with Shared Routing
  5. 2026An Efficient Hybrid Sparse Attention with CPU-GPU Parallelism for Long-Context Inference
  6. 2026Unifying Sparse Attention with Hierarchical Memory for Scalable Long-Context LLM Serving
  7. 2026GLIDE: Guided Layerwise Hybrid Attention for Efficient LLM Inference
  8. 2026From Rigid to Dynamic: Entropy-Guided Adaptive Inference for Long-Context LLMs