arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2312.09299cs.LGcs.CLcs.CV
收藏

权重亚克隆:利用更大的预训练Transformer直接初始化模型

Weight subcloning: direct initialization of transformers using larger pretrained ones

Apple(苹果公司)

Mohammad Samragh, Mehrdad Farajtabar, Sachin Mehta, Raviteja Vemulapalli, Fartash Faghri, Devang Naik, Oncel Tuzel, Mohammad Rastegari

AI总结:

该研究提出权重亚克隆技术,通过神经元重要性排序降维、删减模块两步,用大尺寸预训练Transformer初始化小模型,显著提升了视觉与语言Transformer的训练速度。

摘要:

针对目标任务从头训练大型Transformer模型需要大量数据,且计算成本高昂。迁移学习的常规做法是用相同尺寸和规格的预训练模型权重来初始化模型,以提升收敛速度和训练效率,从而克服这一挑战。但如果没有所需尺寸的预训练模型该怎么办?本文提出了一种简单有效的技术,可将预训练模型的知识迁移到更小的变体模型中。我们提出的方法名为weight subcloning(权重亚克隆),通过从更大的预训练模型中提取权重初始化缩小版Transformer,从而加快其训练速度。\n权重亚克隆通过对预训练模型进行操作,得到等效的初始化缩小版模型。该方法包含两个核心步骤:首先,引入神经元重要性排序,降低预训练模型每层的嵌入维度;其次,移除Transformer模型中的部分模块,使层数与缩小版网络的层数匹配。最终得到可直接训练的网络,与随机初始化相比,训练速度显著提升。例如,在图像分类任务的视觉Transformer以及用于下一词元预测的语言模型上,训练速度可提升4倍。

英文摘要:

Training large transformer models from scratch for a target task requires lots of data and is computationally demanding. The usual practice of transfer learning overcomes this challenge by initializing the model with weights of a pretrained model of the same size and specification to increase the convergence and training speed. However, what if no pretrained model of the required size is available? In this paper, we introduce a simple yet effective technique to transfer the knowledge of a pretrained model to smaller variants. Our approach called weight subcloning expedites the training of scaled-down transformers by initializing their weights from larger pretrained models. Weight subcloning involves an operation on the pretrained model to obtain the equivalent initialized scaled-down model. It consists of two key steps: first, we introduce neuron importance ranking to decrease the embedding dimension per layer in the pretrained model. Then, we remove blocks from the transformer model to match the number of layers in the scaled-down network. The result is a network ready to undergo training, which gains significant improvements in training speed compared to random initialization. For instance, we achieve 4x faster training for vision transformers in image classification and language models designed for next token prediction.

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

↑