AdamW
An improved variant of the Adam optimizer that decouples weight decay from gradient updates, avoiding the improper interaction of L2 regularization within adaptive optimizers. AdamW is a widely used optimizer in modern large-scale model training.
Core Facts
The model weights alone of a 175-billion-parameter model (in BF16 precision) require 350 GB of storage, and the Adam optimizer must maintain two sets of states—first-order moments and second-order moments—totaling more than 1 TB.
AdamW corrects the confusion between weight decay and L2 regularization in Adam by decoupling weight decay from the gradient update, and has become the de facto standard optimizer for training Transformers.
Timeline (last 90 days)
Under pure bf16 training without master weights, a gain parameter initialized to 1.0 updated with AdamW (β₂=0.95) at peak learning rates below 1.7×10⁻³ produces updates less than half a bf16 spacing, causing the gain to remain unmoved across all 22 checkpoints.
Natural PC achieves precise and efficient natural gradient learning by introducing lateral circuits, reaching performance comparable to AdamW and various second-order optimizers on image reconstruction tasks with an order of magnitude lower compute cost and two orders of magnitude fewer training samples.
Training speed (steps per second) was very close across the four optimizers: at learning rate 2e-4, AdamW was 0.391, 8-bit AdamW was 0.390, ApexW Compact was 0.392, and ApexW 8bit was 0.390; at learning rate 5e-5 the trend was similar, with differences between 0.001 and 0.002.
For optimizer state memory, AdamW used 185.501 MB, 8-bit AdamW used 47.865 MB, ApexW Compact used 92.751 MB, and ApexW 8bit used 47.101 MB.
For peak VRAM, AdamW was 2.877 GB, 8-bit AdamW and ApexW 8bit were both 2.742 GB, and ApexW Compact was 2.787 GB.
At learning rate 2e-4, the final loss of ApexW 8bit was 1.0829, 8-bit AdamW was 1.0835, and AdamW was 1.0845; at learning rate 5e-5, ApexW 8bit was 1.1683, 8-bit AdamW was 1.1684, and AdamW was 1.1689.
The test compared four optimizers — PyTorch standard AdamW, BitsAndBytes 8-bit AdamW, ApexW Compact and ApexW 8bit — with each optimizer run at two learning rates (2e-4 and 5e-5).
ResQAdam reduces optimizer state memory by 71% to 74% relative to AdamW.
ResQAdam achieves accuracy close to AdamW in most settings.
When using AdamW for QAT training, each weight matrix needs to maintain two dense FP32 states (first-order and second-order momentum), causing enormous memory overhead.
31 more timeline events
All Facts (20)
The model weights alone of a 175-billion-parameter model (in BF16 precision) require 350 GB of storage, and the Adam optimizer must maintain two sets of states—first-order moments and second-order moments—totaling more than 1 TB.
90%VerifiedAdamW corrects the confusion between weight decay and L2 regularization in Adam by decoupling weight decay from the gradient update, and has become the de facto standard optimizer for training Transformers.
75%UnverifiedDeepSeek V4 uses the MUON optimizer instead of AdamW for training.
85%UnverifiedDecoupled DiLoCo的外部优化器通常使用Nesterov动量SGD,内部优化器通常为AdamW
85%UnverifiedMUON优化器替代了沿用多年的AdamW优化器,通过引入矩阵正交化步骤使训练曲线更加平滑
80%UnverifiedUnder pure bf16 training without master weights, a gain parameter initialized to 1.0 updated with AdamW (β₂=0.95) at peak learning rates below 1.7×10⁻³ produces updates less than half a bf16 spacing, causing the gain to remain unmoved across all 22 checkpoints.
70%UnverifiedIn AdamW, the parameter update is approximately equal to the first moment divided by (the square root of the second moment plus ε), and the reciprocal of the square root of the second moment acts as a preconditioner, adaptively scaling the gradient for each coordinate.
70%UnverifiedAdamW maintains two exponential moving average states, the first moment and the second moment, for each trainable parameter, usually stored in fp32, and in mixed-precision training the optimizer states often take up more GPU memory than the model weights and activations.
70%UnverifiedNatural PC achieves precise and efficient natural gradient learning by introducing lateral circuits, reaching performance comparable to AdamW and various second-order optimizers on image reconstruction tasks with an order of magnitude lower compute cost and two orders of magnitude fewer training samples.
50%UnverifiedThe test compared four optimizers — PyTorch standard AdamW, BitsAndBytes 8-bit AdamW, ApexW Compact and ApexW 8bit — with each optimizer run at two learning rates (2e-4 and 5e-5).
50%UnverifiedResQAdam achieves accuracy close to AdamW in most settings.
50%UnverifiedWhen using AdamW for QAT training, each weight matrix needs to maintain two dense FP32 states (first-order and second-order momentum), causing enormous memory overhead.
50%UnverifiedResQAdam reduces optimizer state memory by 71% to 74% relative to AdamW.
50%UnverifiedNANO (Non-interfering Asymmetric Network Optimization) achieves non-interference between auxiliary gradients and the main-objective gradient under the AdamW optimizer.
50%UnverifiedAdamW maintains first and second moments for each parameter and uses the square root of the second moment to precondition the momentum coordinate-wise, forming an adaptive step size.
50%UnverifiedTechniques that achieve multi-task non-interference via gradient orthogonalization under SGD fail when directly transferred to AdamW.
50%UnverifiedNANO achieves non-interference by projecting the auxiliary update onto the subspace orthogonal to the main loss gradient, and the projection target is the AdamW-preconditioned momentum direction rather than the raw gradient.
50%UnverifiedThe AdamW optimizer decouples weight decay from the gradient update, turning it into an independent parameter shrinkage term.
50%UnverifiedUnder AdamW, two directions that are orthogonal in the original gradient space may no longer be orthogonal after the preconditioning matrix is applied.
50%UnverifiedThere exists a critical point in the pretraining data budget, beyond which AdamW starts to lead Muon in downstream performance after fine-tuning.
50%