NeurIPS 2026QuestionsPapersAreasAboutMarkdown

CompactAttention: Accelerating Chunked Prefill with Block-Union KV Selection

Jiwon Song, Dongwon Jo, Beomseok Kang, jae-joon kim

NeurIPS page · Open on the map

Category: Efficient LLM Inference & Training › Sparse Long-Context Attention · Type: new method · Keywords: chunked prefill, KV selection, attention speedup, large language models, block-sparse masks

Areas: Long Context › Long-context mechanisms › Efficient long-context attention; Model Architectures & Sequence Modeling › Language Model Architectures › Sparse Attention

Summary

CompactAttention accelerates chunked prefill for long-context large language models by using block-union KV selection to generate minimal KV block tables, achieving up to 2.72× speedup while preserving accuracy.

Explained to a 5-year-old

When a big computer reads a long story, it splits it into small chunks and reads each chunk one at a time. To remember what happened, it stores notes called keys and values. The new idea improves how those notes are stored by using a special way to pick only the most important notes. It creates a compact list of notes that still contains everything needed to answer questions. This makes the computer work faster and use less memory.

Explained to a 5-year-old, longer

When a big computer reads a long story, it splits it into small chunks and reads each chunk one at a time. To remember what happened, it stores notes called keys and values. The new idea improves how those notes are stored by using a special way to pick only the most important notes. It creates a compact list of notes that still contains everything needed to answer questions. This makes the computer work faster and use less memory. It also avoids having to move notes around, which saves time. The result is that the computer can answer questions about long stories quickly and accurately. It works especially well for models that handle very long texts. The improvement is measured by comparing speed and accuracy to the usual way of doing things. Overall, the method makes reading long texts easier for computers.

For a technical reader

CompactAttention is a chunked-prefill attention mechanism that leverages block-union KV selection to generate minimal per-group KV block tables for GQA. By interpreting 2D block-sparse masks as selection signals rather than direct kernels, it avoids explicit KV compaction and reduces memory traffic. The construction preserves all KV blocks chosen by the masks under paged execution, enabling in-place access and eliminating copy overhead. Evaluations on LLaMA-3.1-8B-Instruct show that it matches dense-attention accuracy on the RULER benchmark while delivering up to 2.72× speedup at 128K context length. This approach simplifies serving pipelines for long-context LLMs by providing a drop-in replacement that scales efficiently with chunked prefill.

Problem

Efficient attention computation for chunked prefill in long-context language models is challenging because existing sparse methods designed for one-shot prefill lose efficiency, and recent approaches either incur overhead or miss query-specific KV entries.

Method

The approach treats 2D block-sparse masks as KV-selection signals, converts them into GQA-aware per-group KV block tables via Q-block union and intra-group union, producing minimal block tables that preserve selected KV blocks under paged execution, enabling in-place access without KV compaction.

Results

The approach maintains accuracy close to dense attention on the RULER benchmark while delivering up to 2.72× attention speedup at 128K context length under chunked prefill.

Contributions

A block-union KV selection scheme that generates minimal KV block tables for chunked prefill, eliminating explicit KV compaction and preserving query-specific KV entries, along with an empirical evaluation showing significant speedup.

Practical relevance

Enables faster serving of long-context large language models on existing hardware.

Research questions this paper is counted under

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction