Paged Attention Meets FlexAttention: Unlocking Long-Context Efficiency in Deployed Inference
On the map: Efficient LLM inference and serving → KV cache optimization
Abstract (arXiv)
Large Language Models (LLMs) encounter severe memory inefficiencies during long-context inference due to conventional handling of key-value (KV) caches. In this work, we introduce a novel integration of PagedAttention with PyTorch's FlexAttention, addressing internal fragmentation and inefficiencies associated with monolithic KV cache allocations. Implemented within IBM's Foundation Model Stack (FMS), our fused attention kernel efficiently gathers scattered KV data. Our benchmarks on an NVIDIA L4 GPU (24GB) demonstrate significantly reduced inference latency, growing only linearly (~2x) with sequence length from 128 to 2048 tokens when utilizing a global KV cache, compared to exponential latency increases without caching. While peak memory usage remains largely unchanged for single-step evaluations (dominated by model weights and activations), paged attention causes minimal incremental memory usage, observable only at sequence lengths exceeding 2048 tokens due to its power-of-two cache allocations. We open-source the full implementation and discuss its implications for future long-context model deployment.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Placed in KV cache optimization, one of 12 directions in Efficient LLM inference and serving. Builds on 4 of its 21 references that are in the map. First posted on arXiv 8 Jun 2025.
Builds on
4 of 21 references.
Closest ancestors · 1
Same direction, newest first
Other references · 3
Built on by
Citing papers per year: 2026: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2025PagedEviction: Structured Block-wise KV Cache Pruning for Efficient Large Language Model Inference
- 2024Inference-Friendly Models With MixAttention
- 2025LLMs Know What to Drop: Self-Attention Guided KV Cache Eviction for Efficient Long-Context Inference
- 2026Reformulating KV Cache Eviction Problem for Long-Context LLM Inference
- 2025RetroInfer: A Vector Storage Engine for Scalable Long-Context LLM Inference
- 2026Multi-Segment Attention: Enabling Efficient KV-Cache Management for Faster Large Language Model Serving
- 2025HeadInfer: Memory-Efficient LLM Inference by Head-wise Offloading
- 2026Make Each Token Count: Towards Improving Long-Context Performance with KV Cache Eviction