Skip to main content
QUICK REVIEW

[论文解读] GrowLength: Accelerating LLMs Pretraining by Progressively Growing Training Length

Hongye Jin, Xiaotian Han|arXiv (Cornell University)|Oct 1, 2023
Topic Modeling被引用 4
一句话总结

该论文提出GrowLength方法,通过在预训练过程中逐步将输入序列长度从128个token增加到4096个token,从而加速大语言模型(LLM)的预训练。通过从较短序列开始并逐步扩展,该方法在无需额外工程优化的情况下提升了训练效率和模型性能,使模型在相同时间内处理更多token,并实现更低的训练损失,优于固定长度的基线方法。

ABSTRACT

The evolving sophistication and intricacies of Large Language Models (LLMs) yield unprecedented advancements, yet they simultaneously demand considerable computational resources and incur significant costs. To alleviate these challenges, this paper introduces a novel, simple, and effective method named ``\growlength'' to accelerate the pretraining process of LLMs. Our method progressively increases the training length throughout the pretraining phase, thereby mitigating computational costs and enhancing efficiency. For instance, it begins with a sequence length of 128 and progressively extends to 4096. This approach enables models to process a larger number of tokens within limited time frames, potentially boosting their performance. In other words, the efficiency gain is derived from training with shorter sequences optimizing the utilization of resources. Our extensive experiments with various state-of-the-art LLMs have revealed that models trained using our method not only converge more swiftly but also exhibit superior performance metrics compared to those trained with existing methods. Furthermore, our method for LLMs pretraining acceleration does not require any additional engineering efforts, making it a practical solution in the realm of LLMs.

研究动机与目标

  • 解决大语言模型预训练过程中计算成本高和训练时间长的问题。
  • 探究在预训练期间采用动态序列长度是否能提升训练效率和模型性能。
  • 将已在微调阶段取得成功的上下文窗口扩展技术,应用于预训练阶段。
  • 开发一种简单、高效且即插即用的方法,以提升LLM预训练期间的资源利用率。
  • 证明采用逐步增长的序列长度进行训练可实现更快收敛和更好的泛化能力。

提出的方法

  • 该方法在预训练过程中逐步增加输入序列长度,从128个token开始,随时间增长至4096个token。
  • 训练初期使用较短序列,以最大化早期阶段的计算吞吐量和资源利用率。
  • 序列长度按阶段逐步增加(例如:128 → 256 → 512 → 1024 → 2048 → 4096),使模型能够逐步学习长距离依赖关系。
  • 该方法与现有加速技术(如量化、剪枝和FlashAttention)正交,可与之结合使用。
  • 每个序列长度的训练比例通过启发式方法选择,以控制在每个长度上花费的时间比例。
  • 该方法基于一个关键洞察:较短序列计算成本更低,且在经历逐步增长的序列长度后,模型能够泛化到更长的上下文。

实验结果

研究问题

  • RQ1在LLM预训练过程中逐步增加输入序列长度,是否能够加速训练并提升模型性能?
  • RQ2是否先以短序列训练,再逐步增加长度,能带来更高的token效率和更快的收敛速度?
  • RQ3该方法对序列长度增长计划和比例的选择有多敏感?
  • RQ4在相同训练时间内,该方法是否能在训练损失和下游性能上超越固定序列长度的预训练?
  • RQ5GrowLength在多大程度上提升了位置外推能力和长上下文泛化能力?

主要发现

  • 在相同训练时长下,使用GrowLength训练的模型相比固定长度基线(如LLM128和LLM1024)实现了更低的训练损失。
  • 该方法使模型在相同训练时间内处理了显著更多的token,提升了数据效率。
  • 在收敛速度和最终性能方面,GrowLength优于短序列(128)和长序列(1024)的固定长度基线。
  • 该方法对序列长度增长比例具有鲁棒性,即使省略中间长度(如256),性能下降也极小。
  • 当序列长度出现大幅跳跃(如从128直接跳至1024)时,训练损失急剧上升,性能显著下降,表明对突变变化较为敏感。
  • GrowLength是首个从输入序列长度角度加速LLM预训练的方法,提供了一种即插即用的解决方案,且与现有加速技术兼容。

更好的研究,从现在开始

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

无需绑定信用卡

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