Skip to main content
QUICK REVIEW

[论文解读] No Train No Gain: Revisiting Efficient Training Algorithms For Transformer-based Language Models

Jean Kaddour, Oscar Key|arXiv (Cornell University)|Jul 12, 2023
Topic ModelingComputer Science被引用 8
一句话总结

本论文在固定计算预算下评估了三类面向 Transformer 基础的语言模型的高效训练方法,并引入参考系统时间(RST)以标准化墙钟时间比较;多数方法在预算和体系结构下并未优于完全衰减学习率的基线。

ABSTRACT

The computation necessary for training Transformer-based language models has skyrocketed in recent years. This trend has motivated research on efficient training algorithms designed to improve training, validation, and downstream performance faster than standard training. In this work, we revisit three categories of such algorithms: dynamic architectures (layer stacking, layer dropping), batch selection (selective backprop, RHO loss), and efficient optimizers (Lion, Sophia). When pre-training BERT and T5 with a fixed computation budget using such methods, we find that their training, validation, and downstream gains vanish compared to a baseline with a fully-decayed learning rate. We define an evaluation protocol that enables computation to be done on arbitrary machines by mapping all computation time to a reference machine which we call reference system time. We discuss the limitations of our proposed protocol and release our code to encourage rigorous research in efficient training procedures: https://github.com/JeanKaddour/NoTrainNoGain.

研究动机与目标

  • 评估在固定计算预算下,动态体系结构、批量选择或高效优化器是否能带来训练速度或性能提升(针对 Transformer 基 LM)。
  • 提出一个标准化评估协议,将计算映射到参考系统时间(RST),以实现跨硬件的公平比较。
  • 系统性比较在模型类型(BERT-Base、T5-Base)、预算(6小时、12小时、24小时)和数据集上的方法,以了解何时会有改进。
  • 考察每次迭代成本和学习率调度如何与早停或有预算的训练相互作用,影响下游性能。
  • 提供开源工具和评估协议,促进高效训练的严格、可复现研究。

提出的方法

  • 将高效训练方法分为动态体系结构(层叠、层降)、批量选择(选择性反向传播、RHO 损失)和高效优化器(Lion、Sophia)。
  • 引入参考系统时间(RST)作为时间度量:在参考系统上计算每次迭代时间,并将其缩放到任意硬件以进行预算比较。
  • 在固定的RST预算下对 BERT-Base 类似模型和 T5-Base 类似模型进行预训练,并在 GLUE、SuperGLUE 和 SNI 基准上评估下游任务。
  • 基于预训练损失对每种方法的超参数进行调优;比较在固定RST预算结束时的最终性能,而非中间检查点的表现。
  • 提供一个协议,将学习率调度与用于衡量预算的相同单位(RST)保持一致。
  • 在提供的 GitHub 仓库中发布代码,以复现并扩展评估框架。
Figure 2 : BERT models evaluated on SuperGLUE. The black vertical error bars indicate the standard deviation over three seeds. The black horizontal line shows the baseline average performance. For clarity, the individual tasks are plotted against the left-hand axis, while the average accuracy is plo
Figure 2 : BERT models evaluated on SuperGLUE. The black vertical error bars indicate the standard deviation over three seeds. The black horizontal line shows the baseline average performance. For clarity, the individual tasks are plotted against the left-hand axis, while the average accuracy is plo

实验结果

研究问题

  • RQ1在固定计算预算下对 Transformer 模型进行预训练时,动态体系结构、批量选择方法或高效优化器是否能相对于完全衰减学习率基线带来持续的改进?
  • RQ2所提出的参考系统时间(RST)是否为跨方法和跨硬件的训练速度提升比较提供了公平、硬件无关的基础?
  • RQ3在 BERT-Base 和 T5-Base 的预训练设置中,哪些方法在 6 小时、12 小时或 24 小时预算下对训练损失、验证损失或下游任务性能有改进?
  • RQ4每次迭代成本和学习率调度如何影响观测到的加速以及下游结果?

主要发现

  • 在较小预算内,层叠可以在训练损失方面优于基线,但随着预算扩大到 24 小时,这一优势减弱。
  • 层降在各预算和模型中始终不如基线。
  • 选择性反向传播和 RHO 损失在多个数据集的验证损失上很少超过基线。
  • 在 24 小时预算下,所评估的方法均未相对于基线在 GLUE 或 SNI 基准上提升下游性能。
  • 每次迭代成本较低的方法在短预算下可能带来轻微的下游提升,但在较长预算中这一收益消失。
  • 高效优化器(Lion、Sophia)在下游任务中的表现通常与 AdamW 基线相当或更差,且在所测试的条件下表现不佳。
Figure 3 : Validation losses for different datasets . Results for batch selection methods ( selective backprop and RHO loss ) for a 12-hour RST budget.
Figure 3 : Validation losses for different datasets . Results for batch selection methods ( selective backprop and RHO loss ) for a 12-hour RST budget.

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。