Lune

NeurIPS2022顶会

The Stability-Efficiency Dilemma: Investigating Sequence Length Warmup for Training GPT Models

Conglong Li, Minjia Zhang, Yuxiong He

摘要

Recent works have demonstrated great success in pre-training large-scale autoregressive language models (e.g., GPT-3) on massive GPUs. To reduce the wall-clock training time, a common practice is to increase the batch size and learning rate. However, such practice is often brittle and leads to a so-called stability-efficiency dilemma: increasing the batch sizes and learning rates leads to better training efficiency but can also result in training instability, leading to poor generalization accuracy or failed runs. To better understand this phenomenon, we conduct an in-depth analysis on large-scale pre-training experiments replicating the GPT-2 model with public dataset. We find that there is a strong correlation between training instability and extreme values of gradient variance. We further identify that samples with long sequence lengths contribute to these extreme gradient variance values, especially at the beginning of the training, indicating that long sequence length can be a main source of training instability. Based on the analysis, we present a simple yet effective Sequence Length Warmup method that aims to solve the training stability-efficiency dilemma by avoiding extreme gradient variance values. Moreover, we present a lightweight tuning strategy that allows us to tune our method with just a small portion of the expensive full training. Experiments replicating GPT-2 models (117M and 1.5B) show that our approach enables stable training with 8x larger batch size and 4x larger learning rate, whereas the baseline approach struggles with training instability. To achieve the same or better zero-shot evaluation results, our method reduces the required number of training tokens and wall clock time by up to 2.2x and 3.7x, respectively. Experiments replicating GPT-3 model (125M) show that our approach enables stable training with 8x larger batch size and 40x larger learning rate, and retains 99% of the zero-shot accuracy on 11 tasks using 10x less data and 17x less time compared to the original GPT-3 training recipe, while the baseline diverges under the same settings and only retain 95% of accuracy under lower learning rate. This paper was previously titled "Curriculum Learning: A Regularization Method for Efficient and Stable Billion-Scale GPT Model Pre-Training" in an early arxiv preprint version[22].

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 11 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • SkyLadder: Better and Faster Pretraining via Context Window Scheduling 引用了 Dataset Decomposition: Faster LLM Training with Variable Sequence Length Curriculum
  • SkyLadder: Better and Faster Pretraining via Context Window Scheduling 引用了 WinoGrande: An Adversarial Winograd Schema Challenge at Scale
  • Dataset Decomposition: Faster LLM Training with Variable Sequence Length Curriculum 引用了 WinoGrande: An Adversarial Winograd Schema Challenge at Scale
  • DeepSpeed Data Efficiency: Improving Deep Learning Model Quality and Training Efficiency via Efficient Data Sampling and Routing 引用了 Adversarial NLI: A New Benchmark for Natural Language Understanding
  • DeepSpeed Data Efficiency: Improving Deep Learning Model Quality and Training Efficiency via Efficient Data Sampling and Routing 引用了 WinoGrande: An Adversarial Winograd Schema Challenge at Scale
  • DeepSpeed Data Efficiency: Improving Deep Learning Model Quality and Training Efficiency via Efficient Data Sampling and Routing 引用了 Language Models are Few-Shot Learners
  • HyenaDNA: Long-Range Genomic Sequence Modeling at Single Nucleotide Resolution 引用了 Language Models are Few-Shot Learners
  • Block-State Transformers 引用了 Language Models are Few-Shot Learners
  • Language Models are Few-Shot Learners 引用了 Adversarial NLI: A New Benchmark for Natural Language Understanding
  • Language Models are Few-Shot Learners 引用了 WinoGrande: An Adversarial Winograd Schema Challenge at Scale
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper11

  1. HyenaDNA: Long-Range Genomic Sequence Modeling at Single Nucleotide ResolutionEric Nguyen, Michael Poli, Marjan Faizi, Armin W. Thomas 等NeurIPS 2023 · 574 次引用
  2. DeepSpeed Data Efficiency: Improving Deep Learning Model Quality and Training Efficiency via Efficient Data Sampling and RoutingConglong Li, Zhewei Yao, Xiaoxia Wu, Minjia Zhang 等AAAI 2024 · 43 次引用
  3. Dataset Decomposition: Faster LLM Training with Variable Sequence Length CurriculumHadi Pouransari, Chun-Liang Li, Jen-Hao Rick Chang, Pavan Kumar Anasosalu Vasu 等NeurIPS 2024 · 40 次引用
  4. Block-State TransformersJonathan Pilault, Mahan Fathi, Orhan Firat, Chris Pal 等NeurIPS 2023 · 33 次引用
  5. SkyLadder: Better and Faster Pretraining via Context Window SchedulingTongyao Zhu, Qian Liu, Haonan Wang, Shiqi Chen 等NeurIPS 2025 · 6 次引用

它引用的 Paper6

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
  2. WinoGrande: An Adversarial Winograd Schema Challenge at ScaleKeisuke Sakaguchi, Ronan Le Bras, Chandra Bhagavatula, Yejin ChoiAAAI 2020 · 3,037 次引用
  3. Large Batch Optimization for Deep Learning: Training BERT in 76 minutesYang You, Jing Li, Sashank J. Reddi, Jonathan Hseu 等ICLR 2020 · 1,170 次引用
  4. ZeRO: memory optimizations toward training trillion parameter modelsSamyam Rajbhandari, Jeff Rasley, Olatunji Ruwase, Yuxiong HeSC 2020 · 852 次引用
  5. Adversarial NLI: A New Benchmark for Natural Language UnderstandingYixin Nie, Adina Williams, Emily Dinan, Mohit Bansal 等ACL 2020 · 602 次引用

相关 Paper

  1. Efficient Long Context Fine-tuning with Chunk FlowXiulong Yuan, Hongtao Xu, Wenting Shen, Ang Wang 等ICML 2025
  2. Critical Batch Size Revisited: A Simple Empirical Approach to Large-Batch Language Model TrainingWilliam Merrill, Shane Arora, Dirk Groeneveld, Hanna HajishirziNeurIPS 2025 · 23 次引用
  3. YuLan-Mini: Pushing the Limits of Open Data-efficient Language ModelYiwen Hu, Huatong Song, Jie Chen, Jia Deng 等ACL 2025
  4. LongRecipe: Recipe for Efficient Long Context Generalization in Large Language ModelsZhiyuan Hu, Yuliang Liu, Jinman Zhao, Suyuchen Wang 等ACL 2025
  5. Revisiting Parameter-Efficient Tuning: Are We Really There Yet?Guanzheng Chen, Fangyu Liu, Zaiqiao Meng, Shangsong LiangEMNLP 2022 · 49 次引用
黄昏的海面,两侧是细线勾勒的悬崖