Research map / Large language models / Language, safety and interpretability
ParallelComp: Parallel Long-Context Compressor for Length Extrapolation
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Proposes ParallelComp, a training-free parallel chunk-based long-context compression method with KV cache eviction and attention-bias calibration that lets 8B LLMs trained on 8K extrapolate to 128K on one A100 80GB.
Problem
Length extrapolation to ultra-long contexts (>128K) in LLMs is limited by memory bottlenecks and attention sink in training-free methods, especially chunk-based parallel attention.
Approach
Split input into chunks encoded in parallel with reused position encodings, rank chunks by query self-information and evict low-attention KV tokens per chunk, and calibrate attention bias by evicting tokens with abnormally high attention scores.
Key results
- On InfiniteBench beyond 128K, the 8B ParallelComp-based model reaches 91.17% of GPT-4's average performance and is the only model above 90% on the needle-in-a-haystack tasks (R.PK, R.Num, R.KV) as reported in the paper.
- On LongBench, the ParallelComp-Llama3.1 average is 38.15 versus 36.94 for the Llama3.1 baseline under a 24K KV budget.
- Compressing each chunk's KV cache to half size gives a 1.76x chunk throughput improvement and a reported 23.50x prefill speedup, per the paper's throughput table.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| apply ParallelComp with reused position encodings and parallel KV cache eviction | LLaMA3.1 · LongBench (24K KV cache) | AVG: 36.94 -> 38.15 | Helped |
| apply ParallelComp with reused position encodings and parallel KV cache eviction | Qwen2.5 · LongBench (24K KV cache) | AVG: 40.60 -> 41.54 | Helped |
| apply ParallelComp with reused position encodings and parallel KV cache eviction | LLaMA3.1 · InfiniteBench (24K KV cache) | AVG: 26.36 -> 59.55 | Helped |
| apply ParallelComp with reused position encodings and parallel KV cache eviction | Qwen2.5 · InfiniteBench (24K KV cache) | AVG: 53.72 -> 70.64 | Helped |
| add attention calibration by evicting high-attention bias tokens (ablation) | ParallelComp, Llama2-7B-chat-hf · LongBench | AVG: 36.60 -> 37.21 | Helped |
| add attention calibration by evicting high-attention bias tokens (ablation) | ParallelComp, Llama3-8B-instruct · LongBench | AVG: 44.93 -> 45.21 | Helped |
| compress KV cache by evicting low-attention tokens (ablation) | ParallelComp, Llama3-8B-instruct · LongBench | AVG: 44.93 -> 43.31 | Hurt |
| compress KV cache by evicting low-attention tokens (ablation) | ParallelComp, Llama2-7B-chat-hf · LongBench | AVG: 36.60 -> 36.37 | Hurt |
| combine high-attention calibration with low-attention KV cache compression (ablation) | ParallelComp, Llama3-8B-instruct · LongBench | AVG: 44.93 -> 44.31 | Hurt |
| evict sink-bias tokens in layers 1-8 (ablation) | ParallelComp, Llama2-7B-chat-hf · InfiniteBench | Average: 49.45 -> 36.98 | Hurt |
| evict sink-bias tokens in layers 17-23 (ablation) | ParallelComp, Llama2-7B-chat-hf · InfiniteBench | Average: 49.45 -> 50.32 | Helped |
| evict recency-bias tokens in layers 1-8 (ablation) | ParallelComp, Llama2-7B-chat-hf · InfiniteBench | Average: 49.45 -> 44.63 | Hurt |
Surprising findings
- Parallel attention itself partially mitigates recency and sink bias relative to local attention, and KV cache eviction alone tends to exacerbate attention bias.
- Evicting high-attention 'bias' tokens in specific layer ranges can improve performance, with ablations showing layer-dependent effects of sink, recency, and middle token eviction.
Limitations
- Calibration threshold and retained-chunk hyperparameters are manually set and dataset-dependent.
- Some tasks show degradation in the compressed variants and the calibration effect on task performance is uncertain per the authors.
- Theoretical analysis relies on heuristic assumptions (e.g., isotropic sub-Gaussian dot products), with a proof sketch that is loosely argued.
Experimental setup
Datasets: LongBench InfiniteBench NarrativeQA
Benchmarks: LongBench InfiniteBench NarrativeQA perplexity
Metrics: accuracy F1 rouge perplexity throughput peak memory
Baselines: Dynamic-PI NTK-Aware ChunkLlama InfLLM AttenCalibration-NTK APE StarAttention GPT-4 Claude-2 Kimi-Chat
Builds on: ChunkLlama InfLLM NTK-Aware scaled RoPE Flash Attention AttenCalibration
Closest papers by meaning
- A Little Goes a Long Way: Efficient Long Context Training and Inference with Partial Contexts (ICLR 2025 · similarity 0.90)
- RocketKV: Accelerating Long-Context LLM Inference via Two-Stage KV Cache Compression (ICML 2025 · similarity 0.89)
- UniGist: Towards General and Hardware-aligned Sequence-level Long Context Compression (NeurIPS 2025 · similarity 0.89)
- Efficient Prompt Compression with Evaluator Heads for Long-Context Transformer Inference (NeurIPS 2025 · similarity 0.89)
- ChunkKV: Semantic-Preserving KV Cache Compression for Efficient Long-Context LLM Inference (NeurIPS 2025 · similarity 0.89)
- InfLLM: Training-Free Long-Context Extrapolation for LLMs with an Efficient Context Memory (NeurIPS 2024 · similarity 0.88)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
