AdamW is the default optimizer, and it works — but it quietly stores two extra numbers for every weight in the model. Newer optimizers keep less, freeing GPU memory and sometimes converging faster. Here's the trade-off, one knob at a time.
You met the optimizer in Optimizers — the rule that nudges each weight downhill. AdamW is the default, and to do its job it keeps two running numbers per weight.
m) — a running average of the gradient, so updates keep their direction instead of jittering.v) — a running average of the gradient's size, used to give each weight its own step size.m and v — before a single activation.The newer optimizers ask a simple question: do we really need two full numbers per weight? Each keeps less — and the memory you save is real VRAM back.
Saving memory isn't free. The variance term AdamW pays for is also what makes it stable — so cheaper state usually means more careful tuning, and sometimes different convergence.
You've made the optimizer cheaper. The other way to cut training memory is to stop training most of the weights at all — freeze the model and learn a tiny add-on. Next: parameter-efficient fine-tuning (LoRA).