Normalization Layer Per-Example Gradients are Sufficient to Predict Gradient Noise Scale in Transformers
Gavia Gray, Aman Tiwari, Shane Bergsma, Joel Hestness
摘要
Per-example gradient norms are a vital ingredient for estimating gradient noise scale (GNS) with minimal variance. Observing the tensor contractions required to compute them, we propose a method with minimal FLOPs in 3D or greater tensor regimes by simultaneously computing the norms while computing the parameter gradients. Using this method we are able to observe the GNS of different layers at higher accuracy than previously possible. We find that the total GNS of contemporary transformer models is predicted well by the GNS of only the normalization layers. As a result, focusing only on the normalization layer, we develop a custom kernel to compute the per-example gradient norms while performing the LayerNorm backward pass with zero throughput overhead. Tracking GNS on only those layers, we are able to guide a practical batch size schedule that reduces training time by 18% on a Chinchilla-optimal language model.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 6 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Critical Batch Size Revisited: A Simple Empirical Approach to Large-Batch Language Model Training 引用了 Language Models are Few-Shot Learners
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness 引用了 Language Models are Few-Shot Learners
- Fine-Tuning Language Models with Just Forward Passes 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
- Fine-Tuning Language Models with Just Forward Passes 引用了 Language Models are Few-Shot Learners
- Fast Catch-Up, Late Switching: Optimal Batch Size Scheduling via Functional Scaling Laws 引用了 Critical Batch Size Revisited: A Simple Empirical Approach to Large-Batch Language Model Training
- Fast Catch-Up, Late Switching: Optimal Batch Size Scheduling via Functional Scaling Laws 引用了 Language Models are Few-Shot Learners
- Adaptive Batch Sizes Using Non-Euclidean Gradient Noise Scales for Stochastic Sign and Spectral Descent 引用了 Critical Batch Size Revisited: A Simple Empirical Approach to Large-Batch Language Model Training
- Adaptive Batch Sizes Using Non-Euclidean Gradient Noise Scales for Stochastic Sign and Spectral Descent 引用了 Language Models are Few-Shot Learners
- Straight to Zero: Why Linearly Decaying the Learning Rate to Zero Works Best for LLMs 引用了 Language Models are Few-Shot Learners
引用它的顶会 Paper6
- Critical Batch Size Revisited: A Simple Empirical Approach to Large-Batch Language Model TrainingWilliam Merrill, Shane Arora, Dirk Groeneveld, Hanna HajishirziNeurIPS 2025 · 23 次引用
- Fast Catch-Up, Late Switching: Optimal Batch Size Scheduling via Functional Scaling LawsJinbo Wang, Binghui Li, Zhanpeng Zhou, Mingze Wang 等ICLR 2026 · 6 次引用
- Per-example Gradients: a New Frontier for Understanding and Improving OptimizersVincent Roulet, Atish AgarwalaICML 2026 · 2 次引用
- Straight to Zero: Why Linearly Decaying the Learning Rate to Zero Works Best for LLMsShane Bergsma, Nolan Simran Dey, Gurpreet Gosal, Gavia Gray 等ICLR 2025 · 1 次引用
- Adaptive Batch Sizes Using Non-Euclidean Gradient Noise Scales for Stochastic Sign and Spectral DescentHiroki Naganuma, Shagun Gupta, Youssef Briki, Ioannis Mitliagkas 等ICML 2026
它引用的 Paper18
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- QLoRA: Efficient Finetuning of Quantized LLMsTim Dettmers, Artidoro Pagnoni, Ari Holtzman, Luke ZettlemoyerNeurIPS 2023 · 5,863 次引用
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessTri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra 等NeurIPS 2022 · 5,493 次引用
- Large Language Models Can Be Strong Differentially Private LearnersXuechen Li, Florian Tramèr, Percy Liang, Tatsunori HashimotoICLR 2022 · 502 次引用
- Fine-Tuning Language Models with Just Forward PassesSadhika Malladi, Tianyu Gao, Eshaan Nichani, Alex Damian 等NeurIPS 2023 · 495 次引用
相关 Paper
- An empirical analysis of compute-optimal large language model trainingJordan Hoffmann, Sebastian Borgeaud, Arthur Mensch, Elena Buchatskaya 等NeurIPS 2022 · 566 次引用
- Peri-LN: Revisiting Normalization Layer in the Transformer ArchitectureJeonghoon Kim, Byeongchan Lee, Cheonbok Park, Yeontaek Oh 等ICML 2025
- Unified Normalization for Accelerating and Stabilizing TransformersQiming Yang, Kai Zhang, Chaoxiang Lan, Zhi Yang 等ACM MM 2022 · 1 次引用
- Tempo: Accelerating Transformer-Based Model Training through Memory Footprint ReductionMuralidhar Andoorveedu, Zhanda Zhu, Bojian Zheng, Gennady PekhimenkoNeurIPS 2022 · 8 次引用
- GPAS: Accelerating Convergence of LLM Pretraining via Gradient-Preserving Activation ScalingTianhao Chen, Xin Xu, Zijing Liu, Pengxiang Li 等NeurIPS 2025 · 2 次引用
