Stanford Online

Predicting Seed Variance, Warmup & LR Decay | Stanford CS312 Quiz Review with Suhas Kotha

Published 2026-11-25 · Duration 30:51

Summary

This lecture review examines the empirical behavior of large language model (LLM) training, focusing on run-to-run variance, loss jitter, and the effectiveness of learning rate schedules. Key findings include the low run-to-run standard deviation of validation loss (~0.003), the scaling of training loss jitter with batch size ($1/ ext{sqrt}(B)$), and the necessity of tuning warmup and decay phases. The session also covers the role of parameter and gradient norms and the predictive power of scaling laws.

Download summary

Key takeaways

  1. Validation Loss Variance is Low 5:15

    The run-to-run standard deviation for validation loss was found to be approximately 0.003. Differences near 0.003 are generally considered noise, while a difference of 0.02 or more is likely a real improvement [00:05:15].

  2. Jitter Scales with Batch Size 11:50

    Training loss jitter scales roughly as $1/ ext{sqrt}(B)$, where $B$ is the batch size. This suggests that the variance is dominated by sampling variance of the batch, not the model [00:11:50].

  3. Optimal Decay Period 25:30

    To achieve within 0.02 loss of the best schedule, the cooldown (decay) period needed to be around 20% of training in the tested setting [00:25:30].

  4. Warmup Fraction is High

    The optimal warmup fraction was found to be closer to 20-30%, significantly higher than the default 1% used in the training code. This suggests that warmup should be treated as a fixed number of steps rather than a percentage [00:37:20].

More digests on Deep Learning

Technical details

  • Loss Jitter Measurement 710s

    Validation loss exhibits far less jitter compared to training loss, making it the cleaner measurement for variance analysis [00:11:50].

  • Norm Trajectories

    Weight decay slows down parameter growth. The combination of weight decay and learning rate schedules is required to start decreasing the parameter norm after a certain amount of time [00:48:00].

  • Scaling Laws and QK Norm

    The QK norm is important for stability in larger models (e.g., D9), as it makes the model more sensitive to higher learning rates and high variance regimes [00:56:30].

  • Gradient Norm Behavior

    In the tested setting, none of the gradient norms doubled over the course of training. The gradient norm starts very high, which is a difference from some published settings [00:46:30].

Mentioned resources

Channel & topics

Watch on YouTube · Back to latest

This independent, AI-assisted summary is provided for commentary and informational purposes. It may contain errors or omit important context. Please watch the original video for the creator's complete presentation. Video, thumbnail, and related copyrights belong to their respective owners.