Memory accounting for training
For a model with parameters trained with Adam in mixed precision, the standard accounting (from the ZeRO paper) is: bf16 weights ( bytes), bf16 gradients ( bytes), and fp32 optimizer state — a master copy of the weights plus Adam's two moment buffers ( bytes).