通过过渡激活将大语言模型剪枝为模块内低秩架构
Pruning Large Language Models to Intra-module Low-rank Architecture with Transitional Activations
AI总结:
针对大语言模型粗粒度结构化剪枝损伤大、高压缩比难实现的问题,提出任务无关的TransAct剪枝方法,保留模块间激活、剪枝模块内过渡激活,构建模块内低秩架构,在LLaMA上验证了高压缩比下的效率与性能优势。
摘要:
结构化剪枝从根本上降低了大语言模型(LLM)的计算和内存开销,为端侧LLM部署提供了可行方案。经结构化剪枝的模型仍保持稠密性和高精度,与后续微调及压缩操作高度兼容。然而,由于粗粒度结构化剪枝会对高度互联的模型造成较大损伤,为规模化LLM实现高压缩比仍是一项挑战。本文提出一种与任务无关的结构化剪枝方法,并配套设计了紧凑的Transformer架构。该方法名为TransAct,在保留对扰动敏感的模块间激活的同时,减少多头注意力(MHA)和多层感知机(MLP)模块内部的过渡激活,从而将LLM剪枝为模块内低秩架构,显著减少权重、KV缓存和注意力计算量。我们在LLaMA模型上实现了TransAct,并在下游基准上进行评估。结果验证了该方法在高压缩比下在效率和性能两方面的优越性。此外,消融研究揭示了激活引导的迭代剪枝的优势,并对MHA和MLP模块的冗余性提供了实验分析。
英文摘要:
Structured pruning fundamentally reduces computational and memory overheads of large language models (LLMs) and offers a feasible solution for end-side LLM deployment. Structurally pruned models remain dense and high-precision, highly compatible with further tuning and compression. However, as the coarse-grained structured pruning poses large damage to the highly interconnected model, achieving a high compression ratio for scaled-up LLMs remains a challenge. In this paper, we introduce a task-agnostic structured pruning approach coupled with a compact Transformer architecture design. The proposed approach, named TransAct, reduces transitional activations inside multi-head attention (MHA) and multi-layer perceptron (MLP) modules, while preserving the inter-module activations that are sensitive to perturbations. Hence, the LLM is pruned into an intra-module low-rank architecture, significantly reducing weights, KV Cache and attention computation. TransAct is implemented on the LLaMA model and evaluated on downstream benchmarks. Results verify the optimality of our approach at high compression with respect to both efficiency and performance. Further, ablation studies reveal the strength of activation-guided iterative pruning and provide experimental analysis on the redundancy of MHA and MLP modules.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。