mlsanityData to 14 Oct 2026

Paged Attention Meets FlexAttention: Unlocking Long-Context Efficiency in Deployed Inference

arXiv 2506.07311 ↗First posted 8 Jun 2025cs.LG cs.AIcited by 1

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

  1. 2023Efficient Memory Management for Large Language Model Serving with PagedAttention12 Sep

Other references · 3

  1. 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
  2. 2019Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelismcited by 1,868
  3. 2024vAttention: Dynamic Memory Management for Serving LLMs without PagedAttentioncited by 98

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2025PagedEviction: Structured Block-wise KV Cache Pruning for Efficient Large Language Model Inference
  2. 2024Inference-Friendly Models With MixAttention
  3. 2025LLMs Know What to Drop: Self-Attention Guided KV Cache Eviction for Efficient Long-Context Inference
  4. 2026Reformulating KV Cache Eviction Problem for Long-Context LLM Inference
  5. 2025RetroInfer: A Vector Storage Engine for Scalable Long-Context LLM Inference
  6. 2026Multi-Segment Attention: Enabling Efficient KV-Cache Management for Faster Large Language Model Serving
  7. 2025HeadInfer: Memory-Efficient LLM Inference by Head-wise Offloading
  8. 2026Make Each Token Count: Towards Improving Long-Context Performance with KV Cache Eviction