arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2203.10705cs.CLcs.CV
收藏

基于Quantization的生成式预训练语言模型压缩

Compression of Generative Pre-trained Language Models via Quantization

The University of Hong Kong(香港大学);Huawei Noah’s Ark Lab(华为诺亚方舟实验室)

Chaofan Tao, Lu Hou, Wei Zhang, Lifeng Shang, Xin Jiang, Qun Liu, Ping Luo, Ngai Wong

摘要:

生成式预训练语言模型(PLM)的规模不断增大,极大地增加了对模型压缩的需求。尽管有各种方法来压缩BERT或其变体,但很少有人尝试压缩生成PLM,并且潜在的困难仍然不清楚。在本文中,我们压缩生成PLM量化。我们发现,以前的量化方法失败的生成任务,由于\textit{homogeneous word embeddings}所造成的能力降低,和\textit{varied distribution of weights}。相应地,我们提出了一个令牌级的对比蒸馏学习可区分的词嵌入,和一个模块的动态缩放,使量化器适应不同的模块。各种任务的实证结果表明,我们提出的方法优于国家的最先进的压缩方法生成PLM的一个明确的保证金。与全精度模型相比,我们在GPT-2和BART上分别实现了14.4倍和13.4倍的压缩率。

英文摘要:

The increasing size of generative Pre-trained Language Models (PLMs) has greatly increased the demand for model compression. Despite various methods to compress BERT or its variants, there are few attempts to compress generative PLMs, and the underlying difficulty remains unclear. In this paper, we compress generative PLMs by quantization. We find that previous quantization methods fail on generative tasks due to the \textit{homogeneous word embeddings} caused by reduced capacity, and \textit{varied distribution of weights}. Correspondingly, we propose a token-level contrastive distillation to learn distinguishable word embeddings, and a module-wise dynamic scaling to make quantizers adaptive to different modules. Empirical results on various tasks show that our proposed method outperforms the state-of-the-art compression methods on generative PLMs by a clear margin. With comparable performance with the full-precision models, we achieve 14.4x and 13.4x compression rates on GPT-2 and BART, respectively.

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

↑