arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2601.07667cs.CLcs.AIcs.LG
收藏

针对LLM推理中分层令牌剪枝的自适应层选择

Adaptive Layer Selection for Layer-Wise Token Pruning in LLM Inference

NEC Corporation(日本电报电话株式会社);Osaka University(大阪大学);Nagoya University(名古屋大学)

Rei Taniguchi, Yuyang Dong, Makoto Onizuka, Chuan Xiao

AI总结:

本文提出ASL方法,通过自适应选择KV缓存中的层,平衡不同任务性能并满足KV预算要求,优于现有分层令牌剪枝方法。

摘要:

由于大型语言模型(LLM)的普及,关键值(KV)缓存减少在LLM推理中受到了广泛关注。在近年来提出的众多工作中,分层令牌剪枝方法通过在特定层选择一部分令牌保留在KV缓存中并剪枝其他令牌,是其中最受欢迎的方案之一。此类设计在灵活性方面存在不足,因为准确性在不同任务中显著变化,并在更难的任务如KV检索中恶化。本文提出ASL,一种无需训练的方法,利用注意力分数排序中令牌排名的方差,自适应地选择KV缓存减少的层。ASL在预填充阶段运行,并可与现有KV缓存减少方法如SnapKV联合使用以优化解码阶段。通过在InfiniteBench、RULER和NIAH基准上的评估,我们表明,ASL配备单次令牌选择,能够自适应地在推理速度和准确性之间进行权衡,在困难任务中优于现有分层令牌剪枝方法。

英文摘要:

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 ASL, equipped with one-shot token selection, adaptively trades inference speed for accuracy, outperforming state-of-the-art layer-wise token pruning methods in difficult tasks.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑