arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2409.11057cs.CL
收藏

KVPruner:面向更快、内存更高效的大语言模型的结构化剪枝

KVPruner: Structural Pruning for Faster and Memory-Efficient Large Language Models

Huazhong University of Science and Technology(华中科技大学)

Bo Lv, Quan Zhou, Xuanang Ding, Yan Wang, Zeming Ma

AI总结:

针对大语言模型KV缓存推理瓶颈,提出KVPruner结构化剪枝方法,通过全局困惑度分析确定模块重要性并剪枝非必要KV通道,实现内存降50%、吞吐量升超35%,仅需两小时小数据集LoRA微调即可恢复多数性能。

摘要:

键值(KV)缓存相关的瓶颈是大语言模型推理过程中的一大挑战。深度剪枝虽能加速推理,但需要大量恢复训练,耗时最长可达两周;而宽度剪枝能保留大部分性能,但速度提升幅度很小。为解决这些问题,我们提出KVPruner,在维持性能的同时提升模型效率。该方法采用基于全局困惑度的分析确定每个模块的重要性比例,并提供多种策略剪枝模块内非必要的KV通道。与原始模型相比,KVPruner将运行时内存占用降低50%,吞吐量提升超35%。此外,该方法仅需在小数据集上进行两小时的LoRA微调,即可恢复大部分性能。

英文摘要:

The bottleneck associated with the key-value(KV) cache presents a significant challenge during the inference processes of large language models. While depth pruning accelerates inference, it requires extensive recovery training, which can take up to two weeks. On the other hand, width pruning retains much of the performance but offers slight speed gains. To tackle these challenges, we propose KVPruner to improve model efficiency while maintaining performance. Our method uses global perplexity-based analysis to determine the importance ratio for each block and provides multiple strategies to prune non-essential KV channels within blocks. Compared to the original model, KVPruner reduces runtime memory usage by 50% and boosts throughput by over 35%. Additionally, our method requires only two hours of LoRA fine-tuning on small datasets to recover most of the performance.

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

↑