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

用于GPT压缩的Kronecker分解

Kronecker Decomposition for GPT Compression

McGill University(麦吉尔大学);Huawei Noah Ark Lab(华为诺亚方舟实验室)

Ali Edalati, Marzieh Tahaei, Ahmad Rashid, Vahid Partovi Nia, James J. Clark, Mehdi Rezagholizadeh

摘要:

GPT是一种基于自回归变换器的预训练语言模型,由于其在多个下游任务中的最新性能,在自然语言处理(NLP)领域引起了广泛关注。GPT的成功主要归功于其对大量数据的预训练和大量参数(从约100 M到数十亿个参数)。尽管GPT具有优越的性能(尤其是在Few-Shot或zero-shot设置中),但GPT的这种过度参数化性质可能非常不利于在计算能力或内存有限的设备上部署此模型。这个问题可以缓解使用模型压缩技术,但是,压缩GPT模型还没有在文献中研究。在这项工作中,我们使用Kronecker分解来压缩GPT-22模型的线性映射。我们的Kronecker GPT-2模型(KnGPT 2)是基于GPT-2模型的Kronecker分解版本进行初始化的,然后只对一小部分训练数据进行非常轻的预训练,中间层知识蒸馏(ILKD)。最后,我们的KnGPT 2也使用ILKD对下游任务进行了微调。我们在语言建模和通用语言理解评估基准任务上评估了我们的模型,并表明通过更有效的预训练和类似数量的参数,我们的KnGPT 2显著优于现有的DistilGPT 2模型。

英文摘要:

GPT is an auto-regressive Transformer-based pre-trained language model which has attracted a lot of attention in the natural language processing (NLP) domain due to its state-of-the-art performance in several downstream tasks. The success of GPT is mostly attributed to its pre-training on huge amount of data and its large number of parameters (from ~100M to billions of parameters). Despite the superior performance of GPT (especially in few-shot or zero-shot setup), this overparameterized nature of GPT can be very prohibitive for deploying this model on devices with limited computational power or memory. This problem can be mitigated using model compression techniques; however, compressing GPT models has not been investigated much in the literature. In this work, we use Kronecker decomposition to compress the linear mappings of the GPT-22 model. Our Kronecker GPT-2 model (KnGPT2) is initialized based on the Kronecker decomposed version of the GPT-2 model and then is undergone a very light pre-training on only a small portion of the training data with intermediate layer knowledge distillation (ILKD). Finally, our KnGPT2 is fine-tuned on down-stream tasks using ILKD as well. We evaluate our model on both language modeling and General Language Understanding Evaluation benchmark tasks and show that with more efficient pre-training and similar number of parameters, our KnGPT2 outperforms the existing DistilGPT2 model significantly.

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

↑