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

Variator:利用即插即用压缩模块加速预训练模型

Variator: Accelerating Pre-trained Models with Plug-and-Play Compression Modules

Tsinghua University(清华大学);Quan Cheng Laboratory(泉城实验室);Zhili College, Tsinghua University(清华大学志道书院);Gaoling School of Artificial Intelligence, Renmin University of China(中国人民大学高瓴人工智能学院);Tencent Inc.(腾讯公司)

Chaojun Xiao, Yuqi Luo, Wenbin Zhang, Pengle Zhang, Xu Han, Yankai Lin, Zhengyan Zhang, Ruobing Xie, Zhiyuan Liu, Maosong Sun, Jie Zhou

AI总结:

本文提出Variator,一种通过即插即用压缩插件缩短序列长度来加速预训练语言模型的方法,仅增加0.9%参数即可节省53%计算成本,性能下降不足2%,并支持根据负载动态选择不同加速比。

摘要:

预训练语言模型(PLMs)在自然语言处理任务上取得了显著成果,但代价是巨大的参数量和随之而来的计算成本。本文提出Variator,一种参数高效的加速方法,通过即插即用的压缩插件提升计算效率。压缩插件旨在通过将多个隐藏向量压缩为一个来缩短序列长度,并在原始PLMs冻结的情况下进行训练。与将PLMs压缩为更小规模的传统模型加速方法不同,Variator具有两个显著优势:(1)在实际应用中,压缩插件的即插即用特性使得能够根据当前工作负载动态选择具有不同加速比的压缩插件。(2)压缩插件由少量紧凑的神经网络层组成,参数量极小,显著节省存储和内存开销,尤其在任务数量不断增长的场景中。我们在七个数据集上验证了Variator的有效性。实验结果表明,Variator仅使用0.9%的额外参数即可节省53%的计算成本,性能下降不到2%。此外,当模型扩展到数十亿参数时,Variator能达到与未压缩PLMs相当的强劲性能。

英文摘要:

Pre-trained language models (PLMs) have achieved remarkable results on NLP tasks but at the expense of huge parameter sizes and the consequent computational costs. In this paper, we propose Variator, a parameter-efficient acceleration method that enhances computational efficiency through plug-and-play compression plugins. Compression plugins are designed to reduce the sequence length via compressing multiple hidden vectors into one and trained with original PLMs frozen. Different from traditional model acceleration methods, which compress PLMs to smaller sizes, Variator offers two distinct advantages: (1) In real-world applications, the plug-and-play nature of our compression plugins enables dynamic selection of different compression plugins with varying acceleration ratios based on the current workload. (2) The compression plugin comprises a few compact neural network layers with minimal parameters, significantly saving storage and memory overhead, particularly in scenarios with a growing number of tasks. We validate the effectiveness of Variator on seven datasets. Experimental results show that Variator can save 53% computational costs using only 0.9% additional parameters with a performance drop of less than 2%. Moreover, when the model scales to billions of parameters, Variator matches the strong performance of uncompressed PLMs.

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

↑