mlsanityData to 7 Oct 2026

A Training-free Sub-quadratic Cost Transformer Model Serving Framework With Hierarchically Pruned Attention

arXiv 2406.09827 ↗First posted 14 Jun 2024cs.CL cs.CV cs.DCcited by 12

On the map: Retrieval-augmented generation → Generation and context integration

Abstract (arXiv)

In modern large language models (LLMs), increasing the context length is crucial for improving comprehension and coherence in long-context, multi-modal, and retrieval-augmented language generation. While many recent transformer models attempt to extend their context length over a million tokens, they remain impractical due to the quadratic time and space complexities. Although recent works on linear and sparse attention mechanisms can achieve this goal, their real-world applicability is often limited by the need to re-train from scratch and significantly worse performance. In response, we propose a novel approach, Hierarchically Pruned Attention (HiP), which reduces the time complexity of the attention mechanism to O(T log T) and the space complexity to O(T), where T is the sequence length. We notice a pattern in the attention scores of pretrained LLMs where tokens close together tend to have similar scores, which we call ``attention locality''. Based on this observation, we utilize a novel tree-search-like algorithm that estimates the top-k key tokens for a given query on the fly, which is mathematically guaranteed to have better performance than random attention pruning. In addition to improving the time complexity of the attention mechanism, we further optimize GPU memory usage by implementing KV cache offloading, which stores only O(log T) tokens on the GPU while maintaining similar decoding throughput. Experiments on benchmarks show that HiP, with its training-free nature, significantly reduces both prefill and decoding latencies, as well as memory usage, while maintaining high-quality generation with minimal degradation. HiP enables pretrained LLMs to scale up to millions of tokens on commodity GPUs, potentially unlocking long-context LLM applications previously deemed infeasible.

Key facts. Cited by 12 papers in the map (data through 7 Oct 2026). Placed in Generation and context integration, one of 15 directions in Retrieval-augmented generation. Builds on 24 of its 40 references that are in the map. First posted on arXiv 14 Jun 2024.

Builds on

24 of 40 references.

References · 24

  1. 2023Visual Instruction Tuningcited by 7,792
  2. 2020Measuring Massive Multitask Language Understandingcited by 7,768
  3. 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,767
  4. 2023Improved Baselines with Visual Instruction Tuningcited by 4,362
  5. 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,611
  6. 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,551
  7. 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
  8. 2020Big Bird: Transformers for Longer Sequencescited by 1,673
  9. 2020Reformer: The Efficient Transformercited by 1,658
  10. 2022Fast Inference from Transformers via Speculative Decodingcited by 1,615
  11. 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,378
  12. 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,270
12 more
  1. 2023SGLang: Efficient Execution of Structured Language Model Programscited by 1,107
  2. 2024SnapKV: LLM Knows What You are Looking for Before Generationcited by 848
  3. 2024Medusa: Simple LLM Inference Acceleration Framework with Multiple Decoding Headscited by 821
  4. 2019Compressive Transformers for Long-Range Sequence Modellingcited by 699
  5. 2023SpecInfer: Accelerating Generative Large Language Model Serving with Tree-based Speculative Inference and Verificationcited by 359
  6. 2024Break the Sequential Dependency of LLM Inference Using Lookahead Decodingcited by 295
  7. 2020Sparse Sinkhorn Attentioncited by 250
  8. 2024LLM Maybe LongLM: Self-Extend LLM Context Window Without Tuningcited by 133
  9. 2023SparQ Attention: Bandwidth-Efficient LLM Inferencecited by 119
  10. 2023HyperAttention: Long-context Attention in Near-Linear Timecited by 85
  11. 2021Transformer Acceleration with Dynamic Sparse Attentioncited by 19
  12. 2023SEA: Sparse Linear Attention with Estimated Attention Maskcited by 10

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 7; 2026: 5.

12 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024Beyond Linear Approximations: A Novel Pruning Approach for Attention Matrix
  2. 2025Every Token Counts: Generalizing 16M Ultra-Long Context in Large Language Models
  3. 2025Training-free Context-adaptive Attention for Efficient Long Context Modeling
  4. 2026Full Attention Strikes Back: Transferring Full Attention into Sparse within Hundred Training Steps
  5. 2025Sliding Window Attention Training for Efficient Large Language Models
  6. 2025Native Sparse Attention: Hardware-Aligned and Natively Trainable Sparse Attention
  7. 2023Attention Alignment and Flexible Positional Embeddings Improve Transformer Length Extrapolation
  8. 2026Latent-Condensed Transformer for Efficient Long Context Modeling