Asked about Training something too big for one GPU

Why does training need so much more memory than inference?

An answer that works

Inference needs the weights. Training also needs gradients, optimiser state which for Adam is several times the model size, and the activations retained for the backward pass.

Reading an answer is not being able to give one. The section that teaches this is Training something too big for one GPU, 5 hours of Distributed training.

Learn this properly