AI Hardware & Software Stack
Which is NOT a reason training needs much more memory than inference for the same model?
- ATraining multiplies the number of weights several times over
- BIntermediate results of the forward pass (activations) must be stored for backpropagation
- CGradients and optimizer state, as many as the weights, must be held
Show answer and explanation
Answer: A. Training multiplies the number of weights several times over
The number of weights is the same for training and inference. Training, however, must store each layer's intermediate forward results to compute gradients during backpropagation, and also needs gradients equal in number to the weights plus per-weight values held by optimizers such as Adam (two moving averages, for instance). So training memory is many times that of inference, which needs only the weights, and training large models requires many GPUs.
- A. Correct. The number of weights is the same for training and inference.
- B. Stored activations are a large part of training memory.
- C. Gradients and optimizer state need several times the weight memory.