Challenges in Deploying Long-Context Transformers: A Theoretical Peak Performance Analysis
On the map: LLM agents and tool use → Software engineering coding agents
also in 1 more
Abstract (arXiv)
Transformer-based long context generative models power emerging AI applications like hour-long video understanding and project-level coding agent. Deploying long context transformers (e.g., 100K to 10M tokens) is prohibitively expensive compared to short context (e.g., 4K tokens) model variants. Reducing the cost of long-context transformers is becoming a pressing research and engineering challenge starting from the year of 2024. This work describes a concurrent programming framework for quantitatively analyzing the efficiency challenges in serving multiple long-context requests under limited size of GPU high-bandwidth memory (HBM) regime. We give a detailed analysis of how all additional computational costs, compared to 4K context, trace back to textitone single source: the large size of the KV cache. We use a 34B GPT-3.5 level model of 50K context on A100 NVLink as a running example, and describe how its large KV cache causes four types of deployment challenges: (1) prefilling long inputs takes much longer compute time and GPU memory than short inputs; (2) after prefilling, the large KV cache residing on the GPU HBM substantially restricts the number of concurrent users being served; (3) during decoding, repeatedly reading the KV cache from HBM to SM largely increases latency; (4) when KV cache memory overflows, swapping it from HBM to DDR causes significant context switching latency. We use this framework to analyze existing works and identify possibilities of combining them to build end-to-end systems. Overall, this work offers a foundational framework for analyzing long context transformer deployment and identifies directions towards reducing the inference cost of 1M context to be as cheap as 4K.
Key facts. Cited by 44 papers in the map (data through 7 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 28 of its 31 references that are in the map. First posted on arXiv 14 May 2024.
Builds on
28 of 31 references.
References · 28
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2020Scaling Laws for Neural Language Modelscited by 6,411
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,767
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,616
- 2023Qwen Technical Reportcited by 3,273
- 2024Mixtral of Expertscited by 1,785
- 2022Fast Inference from Transformers via Speculative Decodingcited by 1,615
- 2024DeepSeek-V2: A Strong, Economical, and Efficient Mixture-of-Experts Language Modelcited by 1,093
- 2023Accelerating Large Language Model Decoding with Speculative Samplingcited by 975
- 2024SnapKV: LLM Knows What You are Looking for Before Generationcited by 848
- 2019Analyzing Multi-Head Self-Attention: Specialized Heads Do the Heavy Lifting, the Rest Can Be Prunedcited by 844
16 more
- 2023H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Modelscited by 805
- 2024Yi: Open Foundation Models by 01.AIcited by 706
- 2024KIVI: A Tuning-Free Asymmetric 2bit Quantization for KV Cachecited by 604
- 2023Model Tells You What to Discard: Adaptive KV Cache Compression for LLMscited by 466
- 2024LayerSkip: Enabling Early Exit Inference and Self-Speculative Decodingcited by 302
- 2022Confident Adaptive Language Modelingcited by 297
- 2021LongT5: Efficient Text-To-Text Transformer for Long Sequencescited by 232
- 2024Retrieval Head Mechanistically Explains Long-Context Factualitycited by 219
- 2024Data Engineering for Scaling Language Models to 128K Contextcited by 183
- 2024You Only Cache Once: Decoder-Decoder Architectures for Language Modelscited by 135
- 2024Dynamic Memory Compression: Retrofitting LLMs for Accelerated Inferencecited by 115
- 2024LongAlign: A Recipe for Long Context Alignment of Large Language Modelscited by 102
- 2024TriForce: Lossless Acceleration of Long Sequence Generation with Hierarchical Speculative Decodingcited by 98
- 2023CoLT5: Faster Long-Range Transformers with Conditional Computationcited by 84
- 2024Infinite-LLM: Efficient LLM Service for Long Context with DistAttention and Distributed KVCachecited by 71
- 2024WKVQuant: Quantizing Weight and Key/Value Cache for Large Language Models Gains Morecited by 69
Built on by
Citing papers per year: 2024: 15; 2025: 18; 2026: 11.
44 papers.
Sort:
By area:
- 2024MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attentioncited by 375
- 2024HippoRAG: Neurobiologically Inspired Long-Term Memory for Large Language Modelscited by 273
- 2025FlexPrefill: A Context-Aware Sparse Attention Mechanism for Efficient Long-Sequence Inferencecited by 121
- 2024A Simple and Effective L2 Norm-Based Strategy for KV Cache Compressioncited by 84
- 2025Expected Attention: KV Cache Compression by Estimating Attention from Future Queries Distributioncited by 70
- 2024Palu: Compressing KV-Cache with Low-Rank Projectioncited by 59
- 2024SCBench: A KV Cache-Centric Analysis of Long-Context Methodscited by 59
- 2024Block Transformer: Global-to-Local Language Modeling for Fast Inferencecited by 32
- 2025The Sparse Frontier: Sparse Attention Trade-offs in Transformer LLMscited by 28
- 2024Compute Or Load KV Cache? Why Not Both?cited by 25
- 2025SWAN-GPT: An Efficient and Scalable Approach for Long-Context Language Modelingcited by 16
- 2025FreeKV: Boosting KV Cache Retrieval for Efficient LLM Inferencecited by 14
32 more
- 2026KVzap: Fast, Adaptive, and Faithful KV Cache Pruningcited by 14
- 2025xKV: Cross-Layer KV-Cache Compression via Aligned Singular Vector Extractioncited by 13
- 2025SlimInfer: Accelerating Long-Context LLM Inference via Dynamic Token Pruningcited by 13
- 2024Analog In-Memory Computing Attention Mechanism for Fast and Energy-Efficient Large Language Modelscited by 11
- 2024Interpolating Video-LLMs: Toward Longer-sequence LMMs in a Training-free Mannercited by 10
- 2025Re-ttention: Ultra Sparse Visual Generation via Attention Statistical Reshapecited by 10
- 2026SideQuest: Model-Driven KV Cache Management for Long-Horizon Agentic Reasoningcited by 10
- 2025KQ-SVD: Compressing the KV Cache with Provable Guarantees on Attention Fidelitycited by 9
- 2026PackCache: A Training-Free Acceleration Method for Unified Autoregressive Video Generation via Compact KV-Cachecited by 9
- 2024Let the Code LLM Edit Itself When You Edit the Codecited by 8
- 2024Residual vector quantization for KV cache compression in large language modelcited by 7
- 2024freePruner: A Training-free Approach for Large Multimodal Model Accelerationcited by 7
- 2025An LMM for Efficient Video Understanding via Reinforced Compression of Video Cubescited by 7
- 2025CATransformers: Carbon Aware Transformers Through Joint Model-Hardware Optimizationcited by 7
- 2024StreamAdapter: Efficient Test Time Adaptation from Contextual Streamscited by 6
- 2024HashEvict: A Pre-Attention KV Cache Eviction Strategy using Locality-Sensitive Hashingcited by 6
- 2025SparK: Query-Aware Unstructured Sparsity with Recoverable KV Cache Channel Pruningcited by 6
- 2025Q-Filters: Leveraging QK Geometry for Efficient KV Cache Compressioncited by 4
- 2025Retrospective Sparse Attention for Efficient Long-Context Generationcited by 4
- 2026Scout Before You Attend: Sketch-and-Walk Sparse Attention for Efficient LLM Inferencecited by 4
- 2026Sparse Prefix Caching for Hybrid and Recurrent LLM Servingcited by 4
- 2025SALE : Low-bit Estimation for Efficient Sparse Attention in Long-context LLM Prefillingcited by 3
- 2025Learned Structure in Cartridges: Keys as Shareable Routers in Self-Studied Representationscited by 2
- 2026RAP: KV-Cache Compression via RoPE-Aligned Pruningcited by 2
- 2024Discourse Features Enhance Detection of Document-Level Machine-Generated Contentcited by 1
- 2025Towards Sampling Data Structures for Tensor Products in Turnstile Streamscited by 1
- 2025Small Language Models for Phishing Website Detection: Cost, Performance, and Privacy Trade-Offscited by 1
- 2026SLAY: Geometry-Aware Spherical Linearized Attention with Yat-Kernelcited by 1
- 2026VSPrefill: Vertical-Slash Sparse Attention with Lightweight Indexing for Long-Context Prefillingcited by 1
- 2026Think Before you Write: QA-Guided Reasoning for Character Descriptions in Bookscited by 0
- 2026Salca: A Sparsity-Aware Hardware Accelerator for Efficient Long-Context Attention Decodingcited by 0
- 2026OVAL: Output-Aware Local Page Bases for KV Cache Retrievalcited by 0
- 2026OVAL: Output-Aware Local Page Bases for KV Cache Retrieval5 Oct 2026
- 2026Salca: A Sparsity-Aware Hardware Accelerator for Efficient Long-Context Attention Decoding27 Apr 2026
- 2026Sparse Prefix Caching for Hybrid and Recurrent LLM Serving17 Apr 2026
- 2026Think Before you Write: QA-Guided Reasoning for Character Descriptions in Books13 Apr 2026
- 2026VSPrefill: Vertical-Slash Sparse Attention with Lightweight Indexing for Long-Context Prefilling3 Mar 2026
- 2026SideQuest: Model-Driven KV Cache Management for Long-Horizon Agentic Reasoning26 Feb 2026
- 2026Scout Before You Attend: Sketch-and-Walk Sparse Attention for Efficient LLM Inference7 Feb 2026
- 2026SLAY: Geometry-Aware Spherical Linearized Attention with Yat-Kernel4 Feb 2026
- 2026RAP: KV-Cache Compression via RoPE-Aligned Pruning1 Feb 2026
- 2026KVzap: Fast, Adaptive, and Faithful KV Cache Pruning12 Jan 2026
- 2026PackCache: A Training-Free Acceleration Method for Unified Autoregressive Video Generation via Compact KV-Cache7 Jan 2026
- 2025KQ-SVD: Compressing the KV Cache with Provable Guarantees on Attention Fidelity5 Dec 2025
32 more
- 2025Small Language Models for Phishing Website Detection: Cost, Performance, and Privacy Trade-Offs19 Nov 2025
- 2025Towards Sampling Data Structures for Tensor Products in Turnstile Streams4 Oct 2025
- 2025Expected Attention: KV Cache Compression by Estimating Attention from Future Queries Distribution1 Oct 2025
- 2025Learned Structure in Cartridges: Keys as Shareable Routers in Self-Studied Representations23 Aug 2025
- 2025SparK: Query-Aware Unstructured Sparsity with Recoverable KV Cache Channel Pruning21 Aug 2025
- 2025Retrospective Sparse Attention for Efficient Long-Context Generation12 Aug 2025
- 2025SlimInfer: Accelerating Long-Context LLM Inference via Dynamic Token Pruning8 Aug 2025
- 2025SALE : Low-bit Estimation for Efficient Sparse Attention in Long-context LLM Prefilling30 May 2025
- 2025Re-ttention: Ultra Sparse Visual Generation via Attention Statistical Reshape28 May 2025
- 2025FreeKV: Boosting KV Cache Retrieval for Efficient LLM Inference19 May 2025
- 2025CATransformers: Carbon Aware Transformers Through Joint Model-Hardware Optimization2 May 2025
- 2025The Sparse Frontier: Sparse Attention Trade-offs in Transformer LLMs24 Apr 2025
- 2025An LMM for Efficient Video Understanding via Reinforced Compression of Video Cubes21 Apr 2025
- 2025SWAN-GPT: An Efficient and Scalable Approach for Long-Context Language Modeling11 Apr 2025
- 2025xKV: Cross-Layer KV-Cache Compression via Aligned Singular Vector Extraction24 Mar 2025
- 2025Q-Filters: Leveraging QK Geometry for Efficient KV Cache Compression4 Mar 2025
- 2025FlexPrefill: A Context-Aware Sparse Attention Mechanism for Efficient Long-Sequence Inference28 Feb 2025
- 2024Discourse Features Enhance Detection of Document-Level Machine-Generated Content17 Dec 2024
- 2024HashEvict: A Pre-Attention KV Cache Eviction Strategy using Locality-Sensitive Hashing13 Dec 2024
- 2024SCBench: A KV Cache-Centric Analysis of Long-Context Methods13 Dec 2024
- 2024freePruner: A Training-free Approach for Large Multimodal Model Acceleration23 Nov 2024
- 2024StreamAdapter: Efficient Test Time Adaptation from Contextual Streams14 Nov 2024
- 2024Residual vector quantization for KV cache compression in large language model21 Oct 2024
- 2024Compute Or Load KV Cache? Why Not Both?4 Oct 2024
- 2024Analog In-Memory Computing Attention Mechanism for Fast and Energy-Efficient Large Language Models28 Sep 2024
- 2024Interpolating Video-LLMs: Toward Longer-sequence LMMs in a Training-free Manner19 Sep 2024
- 2024Palu: Compressing KV-Cache with Low-Rank Projection30 Jul 2024
- 2024Let the Code LLM Edit Itself When You Edit the Code3 Jul 2024
- 2024MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attention2 Jul 2024
- 2024A Simple and Effective L2 Norm-Based Strategy for KV Cache Compression17 Jun 2024
- 2024Block Transformer: Global-to-Local Language Modeling for Fast Inference4 Jun 2024
- 2024HippoRAG: Neurobiologically Inspired Long-Term Memory for Large Language Models23 May 2024
- 2024A Simple and Effective L2 Norm-Based Strategy for KV Cache Compressioncited by 84
- 2025Expected Attention: KV Cache Compression by Estimating Attention from Future Queries Distributioncited by 70
- 2024Palu: Compressing KV-Cache with Low-Rank Projectioncited by 59
- 2024SCBench: A KV Cache-Centric Analysis of Long-Context Methodscited by 59
- 2024Block Transformer: Global-to-Local Language Modeling for Fast Inferencecited by 32
- 2024Compute Or Load KV Cache? Why Not Both?cited by 25
- 2025FreeKV: Boosting KV Cache Retrieval for Efficient LLM Inferencecited by 14
- 2026KVzap: Fast, Adaptive, and Faithful KV Cache Pruningcited by 14
- 2025xKV: Cross-Layer KV-Cache Compression via Aligned Singular Vector Extractioncited by 13
- 2025SlimInfer: Accelerating Long-Context LLM Inference via Dynamic Token Pruningcited by 13
- 2025KQ-SVD: Compressing the KV Cache with Provable Guarantees on Attention Fidelitycited by 9
- 2026PackCache: A Training-Free Acceleration Method for Unified Autoregressive Video Generation via Compact KV-Cachecited by 9
12 most cited of 23 All 23 (JSON)
- 2026OVAL: Output-Aware Local Page Bases for KV Cache Retrieval5 Oct 2026
- 2026Sparse Prefix Caching for Hybrid and Recurrent LLM Serving17 Apr 2026
- 2026Scout Before You Attend: Sketch-and-Walk Sparse Attention for Efficient LLM Inference7 Feb 2026
- 2026RAP: KV-Cache Compression via RoPE-Aligned Pruning1 Feb 2026
- 2026KVzap: Fast, Adaptive, and Faithful KV Cache Pruning12 Jan 2026
- 2026PackCache: A Training-Free Acceleration Method for Unified Autoregressive Video Generation via Compact KV-Cache7 Jan 2026
- 2025KQ-SVD: Compressing the KV Cache with Provable Guarantees on Attention Fidelity5 Dec 2025
- 2025Expected Attention: KV Cache Compression by Estimating Attention from Future Queries Distribution1 Oct 2025
- 2025Learned Structure in Cartridges: Keys as Shareable Routers in Self-Studied Representations23 Aug 2025
- 2025SparK: Query-Aware Unstructured Sparsity with Recoverable KV Cache Channel Pruning21 Aug 2025
- 2025Retrospective Sparse Attention for Efficient Long-Context Generation12 Aug 2025
- 2025SlimInfer: Accelerating Long-Context LLM Inference via Dynamic Token Pruning8 Aug 2025
12 newest of 23 All 23 (JSON)
- 2024MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attentioncited by 375
- 2025FlexPrefill: A Context-Aware Sparse Attention Mechanism for Efficient Long-Sequence Inferencecited by 121
- 2025The Sparse Frontier: Sparse Attention Trade-offs in Transformer LLMscited by 28
- 2025SWAN-GPT: An Efficient and Scalable Approach for Long-Context Language Modelingcited by 16
- 2024Analog In-Memory Computing Attention Mechanism for Fast and Energy-Efficient Large Language Modelscited by 11
- 2024Interpolating Video-LLMs: Toward Longer-sequence LMMs in a Training-free Mannercited by 10
- 2025CATransformers: Carbon Aware Transformers Through Joint Model-Hardware Optimizationcited by 7
- 2024StreamAdapter: Efficient Test Time Adaptation from Contextual Streamscited by 6
- 2025SALE : Low-bit Estimation for Efficient Sparse Attention in Long-context LLM Prefillingcited by 3
- 2024Discourse Features Enhance Detection of Document-Level Machine-Generated Contentcited by 1
- 2025Towards Sampling Data Structures for Tensor Products in Turnstile Streamscited by 1
- 2025Small Language Models for Phishing Website Detection: Cost, Performance, and Privacy Trade-Offscited by 1
12 most cited of 15 All 15 (JSON)
- 2026Salca: A Sparsity-Aware Hardware Accelerator for Efficient Long-Context Attention Decoding27 Apr 2026
- 2026VSPrefill: Vertical-Slash Sparse Attention with Lightweight Indexing for Long-Context Prefilling3 Mar 2026
- 2026SLAY: Geometry-Aware Spherical Linearized Attention with Yat-Kernel4 Feb 2026
- 2025Small Language Models for Phishing Website Detection: Cost, Performance, and Privacy Trade-Offs19 Nov 2025
- 2025Towards Sampling Data Structures for Tensor Products in Turnstile Streams4 Oct 2025
- 2025SALE : Low-bit Estimation for Efficient Sparse Attention in Long-context LLM Prefilling30 May 2025
- 2025CATransformers: Carbon Aware Transformers Through Joint Model-Hardware Optimization2 May 2025
- 2025The Sparse Frontier: Sparse Attention Trade-offs in Transformer LLMs24 Apr 2025
- 2025SWAN-GPT: An Efficient and Scalable Approach for Long-Context Language Modeling11 Apr 2025
- 2025FlexPrefill: A Context-Aware Sparse Attention Mechanism for Efficient Long-Sequence Inference28 Feb 2025
- 2024Discourse Features Enhance Detection of Document-Level Machine-Generated Content17 Dec 2024
- 2024StreamAdapter: Efficient Test Time Adaptation from Contextual Streams14 Nov 2024
12 newest of 15 All 15 (JSON)
Similar, not cited
Close in wording, no citation either way
- 2025Characterizing State Space Model and Hybrid Language Model Performance with Long Context
- 2025End-to-End Transformer Acceleration Through Processing-in-Memory Architectures
- 2025EdgeInfinite: A Memory-Efficient Infinite-Context Transformer for Edge Devices
- 2024A Little Goes a Long Way: Efficient Long Context Training and Inference with Partial Contexts
- 2026Long-Context Aware Upcycling: A New Frontier for Hybrid LLM Scaling
- 2025Compress, Gather, and Recompute: REFORMing Long-Context Processing in Transformers
- 2025Context Discipline and Performance Correlation: Analyzing LLM Performance and Quality Degradation Under Varying Context Lengths
- 2025Modality Agnostic Efficient Long Range Encoder