Share from 0:00
0:00
/

"SPAM: Spike-Aware Adam with Momentum Reset for Stable LLM Training"

Generated below podcast on this paper with Google's Illuminate.

A new optimizer that makes LLM training both stable and memory-efficient.

SPAM (Spike-Aware Adam with Momentum Reset) enables stable LLM training by managing gradient spikes through momentum reset and adaptive clipping, while reducing memory usage via sparse momentum.

-----

https://arxiv.org/abs/2501.06842

Original Problem πŸ”:

LLM training faces severe instability due to gradient spikes that can be 1000Γ— larger than typical gradients. Current solutions rely on costly manual interventions like checkpoint restarts and data skipping.

-----

Solution in this Paper πŸ› οΈ:

β†’ SPAM introduces momentum reset that periodically zeros out accumulated gradients to prevent spike propagation.

β†’ A spike-aware clipping mechanism identifies and scales down anomalous gradients while preserving their directional information.

β†’ Sparse momentum maintains only a subset of momentum terms, reducing memory requirements.

β†’ SPAM dynamically adjusts clipping thresholds based on gradient statistics during training.

-----

Key Insights from this Paper πŸ”¬:

β†’ Gradient spikes primarily occur in LayerNorm layers despite being the smallest parameter group

β†’ Spikes persist across model sizes from 60M to 1B parameters

β†’ Random selection outperforms magnitude-based methods for sparse momentum

-----

Results πŸ“Š:

β†’ Outperforms Adam by 3.63 perplexity points on LLaMA-60M pre-training

β†’ Reduces memory footprint by 75% while maintaining performance

β†’ Achieves 81.04% accuracy on ImageNet with ConvNeXt-T

Discussion about this video

User's avatar

Ready for more?