Lune

NeurIPS2024Top-tier venue

Normalization Layer Per-Example Gradients are Sufficient to Predict Gradient Noise Scale in Transformers

Gavia Gray, Aman Tiwari, Shane Bergsma, Joel Hestness

Abstract

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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

6 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Critical Batch Size Revisited: A Simple Empirical Approach to Large-Batch Language Model Training cites Language Models are Few-Shot Learners
  • FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness cites Language Models are Few-Shot Learners
  • Fine-Tuning Language Models with Just Forward Passes cites FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • Fine-Tuning Language Models with Just Forward Passes cites Language Models are Few-Shot Learners
  • Fast Catch-Up, Late Switching: Optimal Batch Size Scheduling via Functional Scaling Laws cites 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 cites Language Models are Few-Shot Learners
  • Adaptive Batch Sizes Using Non-Euclidean Gradient Noise Scales for Stochastic Sign and Spectral Descent cites 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 cites Language Models are Few-Shot Learners
  • Straight to Zero: Why Linearly Decaying the Learning Rate to Zero Works Best for LLMs cites Language Models are Few-Shot Learners
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers6

  1. Critical Batch Size Revisited: A Simple Empirical Approach to Large-Batch Language Model TrainingWilliam Merrill, Shane Arora, Dirk Groeneveld, Hanna HajishirziNeurIPS 2025 · 23 citations
  2. Fast Catch-Up, Late Switching: Optimal Batch Size Scheduling via Functional Scaling LawsJinbo Wang, Binghui Li, Zhanpeng Zhou, Mingze Wang et al.ICLR 2026 · 6 citations
  3. Per-example Gradients: a New Frontier for Understanding and Improving OptimizersVincent Roulet, Atish AgarwalaICML 2026 · 2 citations
  4. Straight to Zero: Why Linearly Decaying the Learning Rate to Zero Works Best for LLMsShane Bergsma, Nolan Simran Dey, Gurpreet Gosal, Gavia Gray et al.ICLR 2025 · 1 citation
  5. Adaptive Batch Sizes Using Non-Euclidean Gradient Noise Scales for Stochastic Sign and Spectral DescentHiroki Naganuma, Shagun Gupta, Youssef Briki, Ioannis Mitliagkas et al.ICML 2026

Builds on18

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. QLoRA: Efficient Finetuning of Quantized LLMsTim Dettmers, Artidoro Pagnoni, Ari Holtzman, Luke ZettlemoyerNeurIPS 2023 · 5,863 citations
  3. FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessTri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra et al.NeurIPS 2022 · 5,493 citations
  4. Large Language Models Can Be Strong Differentially Private LearnersXuechen Li, Florian Tramèr, Percy Liang, Tatsunori HashimotoICLR 2022 · 502 citations
  5. Fine-Tuning Language Models with Just Forward PassesSadhika Malladi, Tianyu Gao, Eshaan Nichani, Alex Damian et al.NeurIPS 2023 · 495 citations

Related papers

  1. An empirical analysis of compute-optimal large language model trainingJordan Hoffmann, Sebastian Borgeaud, Arthur Mensch, Elena Buchatskaya et al.NeurIPS 2022 · 566 citations
  2. Peri-LN: Revisiting Normalization Layer in the Transformer ArchitectureJeonghoon Kim, Byeongchan Lee, Cheonbok Park, Yeontaek Oh et al.ICML 2025
  3. Unified Normalization for Accelerating and Stabilizing TransformersQiming Yang, Kai Zhang, Chaoxiang Lan, Zhi Yang et al.ACM MM 2022 · 1 citation
  4. Tempo: Accelerating Transformer-Based Model Training through Memory Footprint ReductionMuralidhar Andoorveedu, Zhanda Zhu, Bojian Zheng, Gennady PekhimenkoNeurIPS 2022 · 8 citations
  5. GPAS: Accelerating Convergence of LLM Pretraining via Gradient-Preserving Activation ScalingTianhao Chen, Xin Xu, Zijing Liu, Pengxiang Li et al.NeurIPS 2025 · 2 citations
Dusk over the sea between two cliffs drawn in fine vertical lines