FlexComp: One Model for Every Ratio in Context Compression
Kaiyan Zhao, Zhongtao Miao, Akiko Aizawa, Yoshimasa Tsuruoka
Key points
From the paper's conclusion- We propose FlexComp, a method-agnostic framework that decouples the ratio from both training and deployment: Matryoshka-style training samples the memory budget $K$ per instance, turning one model into an any-ratio compressor, and the budget is then chosen per input by: (1) confidence-based cascade routing or (2) a lightweight learned $K$ predictor.
Abstract
Soft context compression condenses a context into a few memory tokens that a frozen LLM consumes in place of the raw text, but existing compressors fix the compression ratio at training and inference: each deployed ratio requires a separately trained model, and the chosen ratio is applied uniformly to all inputs, whose actual needs vary drastically. We propose FlexComp, a method-agnostic framework that decouples the ratio from both training and deployment: Matryoshka-style training samples the memory budget $K$ per instance, turning one model into an any-ratio compressor, and the budget is then chosen per input by: (1) confidence-based cascade routing or (2) a lightweight learned $K$ predictor. Across ICAE, 500xCompressor, and SAC on MRQA, a single FlexComp model matches separately trained fixed-ratio specialists with minimal degradation. Cascade routing preserves over 98% of the mildest ratio's accuracy at up to 266x average compression; the $K$ predictor, in a single compression-decoding pass, reaches 158-236x within 0.7 F1 of the mildest ratio. At serving-scale batch sizes, the $K$ predictor cuts context KV cache by 50% and improves decoding throughput by 47%.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Beyond Compressing Everything: Contrastive Memory Learning for Selective Context CompressionarXiv · 2026
- GACC-Bench: Benchmarking Goal-Adaptive Context Compression Ability across Large Language ModelsarXiv · 2026
- ACE-Compression: An Ability-Centric Evaluation of Compressed Large Language ModelsarXiv · 2026
- Large Language Model Compression for Autoregressive Text Generation: Methods, Evaluation, and Deployment Trade-OffsElectronics · 2026
- Linear-Time Context Compression with State-Space EncodingarXiv · 2026
- LowRAM: Low-Rank Keys and Amortised Values for Composable KV Cache Compression at Test-TimearXiv · 2026