Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

BEAVER: A Training-Free Hierarchical Prompt Compression Method via Structure-Aware Page Selection

About

The exponential expansion of context windows in LLMs has unlocked capabilities for long-document understanding but introduced severe bottlenecks in inference latency and information utilization. Existing compression methods often suffer from high training costs or semantic fragmentation due to aggressive token pruning. In this paper, we propose BEAVER, a novel training-free framework that shifts compression from linear token removal to structure-aware hierarchical selection. BEAVER maximizes hardware parallelism by mapping variable-length contexts into dense page-level tensors via dual-path pooling, and preserves discourse integrity through a hybrid planner combining semantic and lexical dual-branch selection with sentence smoothing. Extensive evaluations on four long-context benchmarks demonstrate that BEAVER achieves comparable performance to state-of-the-art (SOTA) methods like LongLLMLingua. Notably, on the RULER benchmark, BEAVER maintains high fidelity in multi-needle retrieval where baselines deteriorate. Regarding efficiency, BEAVER reduces latency by 26.4x on 128k contexts, offering a scalable solution for high-throughput applications. Our code is available at https://cslikai.cn/BEAVER/.

Zhengpei Hu, Kai Li, Dapeng Fu, Chang Zeng, Yue Li, Yuanhao Tang, Jianqiang Huang• 2026

Related benchmarks

TaskDatasetResultRank
Long-context Language UnderstandingLongBench--
292
Zero-shot long-context reasoningZeroSCROLLS
Average Score32.4
18
Prompt CompressionL-Eval (test)
Coursera QA Accuracy64.4
5
Long-context Question AnsweringL-Eval
Coursera QA28.3
4
Long-context retrieval and reasoningRULER 16k context 3k budget
S-1 Score100
4
Showing 5 of 5 rows

Other info

GitHub

Follow for update