arXivDaily arXiv每日学术速递 周一至周五更新
看起来今天可以划水了
arXiv 2501.09412cs.LG
收藏

FASP:大语言模型的快速精准结构化剪枝

FASP: Fast and Accurate Structured Pruning of Large Language Models

The University of Hong Kong(香港大学);Huawei Cloud(华为云)

Hanyu Hu, Pengxiang Zhao, Ping Li, Yi Zheng, Zhefeng Wang, Xiaoming Yuan

AI总结:

针对大语言模型部署的算力与内存瓶颈,本文提出新型结构化剪枝框架FASP,通过关联连续层的剪枝结构、高效剪枝度量与权重恢复机制,在OPT、LLaMA系列模型上实现了更优性能与极快的剪枝速度。

摘要:

大语言模型(LLM)规模的快速增长大幅提升了其计算与内存需求,给高效部署带来挑战,在资源受限设备上尤为突出。结构化剪枝已成为一种有效的模型压缩方法,既能降低这类需求,又能保留模型性能。本文提出FASP(Fast and Accurate Structured Pruning,快速精准结构化剪枝),一种兼顾速度与精度的新型LLM结构化剪枝框架。FASP采用一种独特的剪枝结构,将连续层相互关联,可在移除某一层的列的同时,消除前一层对应的行,且不会带来额外的性能损失。其剪枝度量受Wanda启发,计算效率高,能有效选择待剪枝的组件。此外,我们提出一种恢复机制,通过在剪枝后调整剩余权重来提升模型保真度。我们在OPT和LLaMA模型族上评估了FASP,结果表明,与现有最优方法相比,其在困惑度和下游任务准确率上表现更优。我们的方法实现了显著的速度提升,在单张NVIDIA RTX 4090 GPU上,剪枝OPT-125M仅需17秒,剪枝LLaMA-30B仅需15分钟,是优化LLM的高实用性方案。

英文摘要:

The rapid increase in the size of large language models (LLMs) has significantly escalated their computational and memory demands, posing challenges for efficient deployment, especially on resource-constrained devices. Structured pruning has emerged as an effective model compression method that can reduce these demands while preserving performance. In this paper, we introduce FASP (Fast and Accurate Structured Pruning), a novel structured pruning framework for LLMs that emphasizes both speed and accuracy. FASP employs a distinctive pruning structure that interlinks sequential layers, allowing for the removal of columns in one layer while simultaneously eliminating corresponding rows in the preceding layer without incurring additional performance loss. The pruning metric, inspired by Wanda, is computationally efficient and effectively selects components to prune. Additionally, we propose a restoration mechanism that enhances model fidelity by adjusting the remaining weights post-pruning. We evaluate FASP on the OPT and LLaMA model families, demonstrating superior performance in terms of perplexity and accuracy on downstream tasks compared to state-of-the-art methods. Our approach achieves significant speed-ups, pruning models such as OPT-125M in 17 seconds and LLaMA-30B in 15 minutes on a single NVIDIA RTX 4090 GPU, making it a highly practical solution for optimizing LLMs.

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

↑