Challenges in Deploying Long-Context Transformers: A Theoretical Peak Performance Analysis
Yao Fu

TL;DR
This paper provides a theoretical framework for analyzing the efficiency challenges of deploying long-context transformers, focusing on the impact of large KV caches on computational cost, memory, and latency.
Contribution
It introduces a quantitative framework to analyze deployment challenges of long-context transformers, highlighting the KV cache as the main cost driver and guiding future cost reduction strategies.
Findings
Large KV cache causes increased computation and memory costs.
Prefilling and decoding with long contexts significantly increase latency.
Memory overflow leads to costly swapping, impacting performance.
Abstract
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 \textit{one 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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsParallel Computing and Optimization Techniques
MethodsRefunds@Expedia|||How do I get a full refund from Expedia? · {Dispute@FaQ-s}How to file a dispute with Expedia? · 15 Ways to Contact How can i speak to someone at Delta Airlines · Attention Is All You Need · Cosine Annealing · Dropout · Linear Warmup With Cosine Annealing · Residual Connection · Byte Pair Encoding · Adam
