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

STAT:训练后缩减Transformers

STAT: Shrinking Transformers After Training

Cornell University(康奈尔大学);University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校)

Megan Flynn, Alexander Wang, Dean Edward Alvarez, Christopher De Sa, Anil Damle

AI总结:

提出无需微调的STAT剪枝算法,通过矩阵分解与权重校正消除注意力头和神经元,在单GPU上快速压缩7B参数模型,且精度媲美需大量微调的方法。

摘要:

我们提出了STAT:一种无需任何微调即可剪枝transformer模型的简单算法。STAT通过计算对下一层权重的校正,在消除网络中注意力头和神经元的同时保持准确率。网络中的每个层块均使用一系列保持网络结构的原则性矩阵分解进行压缩。我们的整个算法在单GPU上仅需几分钟即可压缩BERT,压缩具有7B参数的模型不到三小时。仅使用数百个数据样本,STAT便保持了网络输出,并改进了现有的无梯度剪枝方法。它甚至可与包含大量微调的方法相竞争。我们在编码器和解码器架构上验证了该方法,包括BERT、DistilBERT和Llama-2,使用的基准有GLUE、Squad、WikiText2。

英文摘要:

We present STAT: a simple algorithm to prune transformer models without any fine-tuning. STAT eliminates both attention heads and neurons from the network, while preserving accuracy by calculating a correction to the weights of the next layer. Each layer block in the network is compressed using a series of principled matrix factorizations that preserve the network structure. Our entire algorithm takes minutes to compress BERT, and less than three hours to compress models with 7B parameters using a single GPU. Using only several hundred data examples, STAT preserves the output of the network and improves upon existing gradient-free pruning methods. It is even competitive with methods that include significant fine-tuning. We demonstrate our method on both encoder and decoder architectures, including BERT, DistilBERT, and Llama-2 using benchmarks such as GLUE, Squad, WikiText2.

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

↑