[论文解读] Adaptive Layer Selection for Layer-Wise Token Pruning in LLM Inference
ASL 自适应地在预填充过程中通过监测 token 排序的方差来选择令牌选择层,使 LLM 推理在不需要额外训练的情况下实现任务感知的 KV 缓存减少。
Due to the prevalence of large language models (LLMs), key-value (KV) cache reduction for LLM inference has received remarkable attention. Among numerous works that have been proposed in recent years, layer-wise token pruning approaches, which select a subset of tokens at particular layers to retain in KV cache and prune others, are one of the most popular schemes. They primarily adopt a set of pre-defined layers, at which tokens are selected. Such design is inflexible in the sense that the accuracy significantly varies across tasks and deteriorates in harder tasks such as KV retrieval. In this paper, we propose ASL, a training-free method that adaptively chooses the selection layer for KV cache reduction, exploiting the variance of token ranks ordered by attention score. The proposed method balances the performance across different tasks while meeting the user-specified KV budget requirement. ASL operates during the prefilling stage and can be jointly used with existing KV cache reduction methods such as SnapKV to optimize the decoding stage. By evaluations on the InfiniteBench, RULER, and NIAH benchmarks, we show that equipped with one-shot token selection, where tokens are selected at a layer and propagated to deeper layers, ASL outperforms state-of-the-art layer-wise token selection methods in accuracy while maintaining decoding speed and KV cache reduction.
研究动机与目标
- 识别现有按层裁剪方法在不同任务中固定选择层的僵化性。
- 提出 ASL,一种无需训练的自适应方法,根据注意力排名方差来选择裁剪层。
- 使 ASL 能与现有 KV 缓存减少技术协同工作,以满足特定 KV 预算。
- 在多个长上下文基准上展示 ASL 的准确性与效率权衡。
提出的方法
- 在 Prefill 过程中,跨连续层监测按注意力分数排序的 token 方差。
- 从最近几层计算汇聚注意力分数,并确定用于方差计算的 top token 的并集。
- 当相对方差低于用户指定的阈值时触发令牌选择,指定当前层为选择层。
- 以一次性方式选择令牌并将其传播到更深层以实现 KV 缓存减少。
- 可选地将 ASL 与现有 KV 缓存减少方法(如 SnapKV、GemFilter)集成,在解码期间满足 KV 预算约束。

实验结果
研究问题
- RQ1自适应、无需训练的层选择标准是否能提高跨越多样任务的按层裁剪鲁棒性?
- RQ2监测注意力驱动的 token 排序方差是否能有效指示裁剪令牌的最佳时机?
- RQ3在不同 KV 预算和任务难度下,ASL 相对于固定层裁剪方法的表现如何?
- RQ4ASL 能否在不需要额外训练的情况下与现有 KV 缓存减少技术无缝结合?
主要发现
- ASL 在长上下文基准上相对于最先进的固定层裁剪方法具有更高的准确性。
- ASL 在保持解码速度和 KV 缓存减少的同时,提升了特定任务性能,尤其是在 KV 检索等更难的任务上。
- ASL 可以在 Prefilling 期间作为一次性选择方法部署,并可与 SnapKV 或 GemFilter 搭配以达到目标 KV 预算。
- ASL 的自适应选择层缩小了易难任务之间的性能差距,无需针对特定任务进行微调。
- ASL 在 InfiniteBench、RULER 和 Needle in a Haystack (NIAH) 上展示了有利的准确性与效率权衡。

阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。