Skip to main content
QUICK REVIEW

[论文解读] Reusing Pretrained Models by Multi-linear Operators for Efficient Training

Yu Pan, Ye Yuan|arXiv (Cornell University)|Oct 16, 2023
Advanced Neural Network Applications被引用 4
一句话总结

本文提出Mango,一种多线性算子,可实现从小型预训练模型到大型目标模型的完整权重映射,捕捉网络中全部的跨层与层内权重相关性。通过使用张量环结构对大型映射张量进行分解,Mango在降低计算与内存开销的同时,在DeiT-base迁移任务中实现76%的FLOPs降低,并在训练效率上分别优于bert2BERT与LiGO 12.0%与20.7%。

ABSTRACT

Training large models from scratch usually costs a substantial amount of resources. Towards this problem, recent studies such as bert2BERT and LiGO have reused small pretrained models to initialize a large model (termed the ``target model''), leading to a considerable acceleration in training. Despite the successes of these previous studies, they grew pretrained models by mapping partial weights only, ignoring potential correlations across the entire model. As we show in this paper, there are inter- and intra-interactions among the weights of both the pretrained and the target models. As a result, the partial mapping may not capture the complete information and lead to inadequate growth. In this paper, we propose a method that linearly correlates each weight of the target model to all the weights of the pretrained model to further enhance acceleration ability. We utilize multi-linear operators to reduce computational and spacial complexity, enabling acceptable resource requirements. Experiments demonstrate that our method can save 76\% computational costs on DeiT-base transferred from DeiT-small, which outperforms bert2BERT by +12.0\% and LiGO by +20.7\%, respectively.

研究动机与目标

  • 解决现有模型蒸馏与生长方法中部分权重映射的低效问题。
  • 利用整个模型中跨层与层内权重的相关性,提升初始化质量。
  • 降低小型与大型模型之间全映射的计算与内存开销。
  • 通过使用预训练的小型模型,实现大规模Transformer模型的更快、更高效训练。
  • 通过最小化资源消耗与碳排放,支持绿色AI。

提出的方法

  • 提出一种全映射策略,将目标模型中的每个权重与预训练模型中的所有权重相关联,而非部分或层特定的映射。
  • 引入Mango,一种基于张量环分解的多线性算子,以减少空间与计算量,高效表示大型全映射张量。
  • 使用四个通过秩连接的低秩张量近似全映射,实现可扩展且可训练的参数化。
  • 端到端联合训练Mango算子与目标模型,使其学习从小模型到大模型的最优变换。
  • 将该方法应用于视觉(DeiT)、自然语言处理(BERT)及语言模型(GPT),证明其在不同架构间的泛化能力。
  • 采用标准训练协议:AdamW优化器,初始学习率1e-4,权重衰减1e-2,批量大小512,用于评估。

实验结果

研究问题

  • RQ1与部分权重映射相比,跨所有模型参数的全权重映射是否能提升训练效率?
  • RQ2像Mango这样的多线性算子是否能有效压缩全映射张量而不损失性能?
  • RQ3利用模型间与模型内权重的相关性是否能实现更快收敛与更高准确率?
  • RQ4在FLOPs与训练速度方面,该方法与state-of-the-art方法(如bert2BERT与LiGO)相比如何?
  • RQ5Mango是否可在ViT、BERT与GPT等不同架构上实现泛化?

主要发现

  • 在将DeiT-base从DeiT-small迁移时,Mango将FLOPs降低76%,显著优于基线方法。
  • 在GLUE基准上,Mango实现90.60%的平均准确率,训练效率分别高于bert2BERT(+12.0%)与LiGO(+20.7%)。
  • 在SQuADv1.1上,Mango实现90.17%的F1分数,优于bert2BERT(90.02%)与LiGO(90.09%),且FLOPs更低。
  • 在从GPT-Small到GPT-Base的迁移中,Mango实现59.9%的训练加速比,收敛速度超过bert2BERT与LiGO。
  • Mango在整个训练过程中保持最低的训练损失,在GPT任务上分别较bert2BERT与LiGO实现+16.7%与+21.8%的性能提升。
  • 该方法在视觉、自然语言处理与语言建模任务中均表现出一致增益,证明其泛化性与可扩展性。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。