Skip to main content
QUICK REVIEW

[论文解读] Simple and Scalable Strategies to Continually Pre-train Large Language Models

Adam Ibrahim, Benjamin Thérien|arXiv (Cornell University)|Mar 13, 2024
Topic ModelingComputer Science被引用 3
一句话总结

本文提出了一种简单且可扩展的自回归Transformer架构大语言模型(LLMs)持续预训练策略,结合学习率重热、重衰减以及历史数据重放。该方法在仅使用极少计算资源的情况下,实现了与从头开始完整微调相同性能——在两种分布偏移(英语→英语 和 英语→德语)以及两种模型规模(405M 和 10B 参数)下,均达到与完整微调基线相当的性能。

ABSTRACT

Large language models (LLMs) are routinely pre-trained on billions of tokens, only to start the process over again once new data becomes available. A much more efficient solution is to continually pre-train these models, saving significant compute compared to re-training. However, the distribution shift induced by new data typically results in degraded performance on previous data or poor adaptation to the new data. In this work, we show that a simple and scalable combination of learning rate (LR) re-warming, LR re-decaying, and replay of previous data is sufficient to match the performance of fully re-training from scratch on all available data, as measured by the final loss and the average score on several language model (LM) evaluation benchmarks. Specifically, we show this for a weak but realistic distribution shift between two commonly used LLM pre-training datasets (English$ ightarrow$English) and a stronger distribution shift (English$ ightarrow$German) at the $405$M parameter model scale with large dataset sizes (hundreds of billions of tokens). Selecting the weak but realistic shift for larger-scale experiments, we also find that our continual learning strategies match the re-training baseline for a 10B parameter LLM. Our results demonstrate that LLMs can be successfully updated via simple and scalable continual learning strategies, matching the re-training baseline using only a fraction of the compute. Finally, inspired by previous work, we propose alternatives to the cosine learning rate schedule that help circumvent forgetting induced by LR re-warming and that are not bound to a fixed token budget.

研究动机与目标

  • 为解决每当新数据出现时,从头开始微调大语言模型(LLMs)所带来的高昂计算成本问题。
  • 探究简单且可扩展的持续学习策略是否能在有效适应新数据的同时,保持对先前数据的性能表现。
  • 评估学习率调度与数据重放策略在缓解持续预训练过程中灾难性遗忘方面的有效性。
  • 探索标准余弦学习率调度的替代方案,以避免学习率重热带来的缺陷。
  • 证明在大规模场景下,持续预训练可达到与完整微调相当的性能,即使在强分布偏移条件下亦如此。

提出的方法

  • 在每个新预训练阶段开始时采用学习率(LR)重热,以提升对新数据的适应能力。
  • 在重热之后应用学习率重衰减,以稳定训练过程并提升在新数据上的收敛性能。
  • 通过重放一小部分(例如1%)先前见过的数据来缓解灾难性遗忘。
  • 提出无限学习率调度作为余弦衰减的替代方案,以避免学习率重热带来的性能下降。
  • 在大规模数据集(2000亿+ token)上进行训练,涵盖两种分布偏移:弱偏移(英语→英语)与强偏移(英语→德语)。
  • 通过最终损失值与多个语言建模基准的平均得分来评估性能。

实验结果

研究问题

  • RQ1LR重热、重衰减与数据重放的简单组合是否能够实现与从头开始完整微调性能相当的持续预训练?
  • RQ2该策略在弱分布偏移(英语→英语)与强分布偏移(英语→德语)下的表现如何?
  • RQ3所提出的无限学习率调度是否能通过避免学习率重热的负面影响,超越标准余弦衰减?
  • RQ4在大规模新数据集上的持续预训练中,数据重放能在多大程度上缓解灾难性遗忘?
  • RQ5该策略在更大模型(如100亿参数)与更大数据量下是否仍具有效果?

主要发现

  • 所提出的LR重热、重衰减与数据重放策略,在最终损失值与平均基准得分上,均实现了与从头开始完整微调相当的性能表现。
  • 该方法即使在强分布偏移(英语→德语)下,也能成功缓解灾难性遗忘,保持对先前数据的高性能表现。
  • 对于40500万参数模型,该持续预训练策略在弱偏移(英语→英语)与强偏移(英语→德语)下均达到完整微调基线性能。
  • 对于100亿参数模型,该策略在弱分布偏移(英语→英语)下也达到完整微调基线性能,证实了其可扩展性。
  • 所提出的无限学习率调度避免了学习率重热导致的性能下降,并在无需固定token预算的情况下,实现了与余弦衰减相当的结果。
  • 本研究证明,持续预训练是一种切实可行且高效的完整微调替代方案,在显著降低计算成本的同时,保持了模型质量。

阅读本论文

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

在 Nubint 中阅读本论文

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