MILO: Efficient Many-shot In-Context Learning with Block-wise Low-rank Compression
TL;DR - MILO compresses the KV cache for many-shot in-context learning using block-wise low-rank approximation and entropy-based rank allocation. On Qwen2.5 models, it reduces KV-cache memory by up to 50% and improves throughput by up to 1.8Ă— with negligible benchmark degradation.
- Compresses KV tensors at the block level, grouping multiple in-context demonstrations per block.
- Exploits low-rank redundancy in long, many-shot contexts to reduce inference memory requirements.
- Dynamically assigns rank budgets based on each block’s information entropy, retaining more capacity for information-dense blocks.
- Outperforms prior compression baselines on the reported classification and reasoning evaluations.