EasyDeepLearn

Why does Adafactor use less memory than Adam?

hard

Answer

  • Adafactor factorizes the second-moment matrix v: instead of storing a full vtv_{t} per parameter (O(N) memory), it stores row-sum and column-sum statistics for each 2D weight matrix (O(sqrt(N))).
  • Massive memory savings — enabled T5 training.
  • Trade-off: some hyperparameters harder to tune, occasionally less stable than full Adam.
Check yourself — multiple choice
  • Adafactor uses more memory
  • Factorizes the second moment via row/column stats — O(√N) memory instead of O(N)
  • Adafactor uses second-order Hessian
  • Removes momentum entirely

Adafactor factorizes vtv_{t} → dramatically less optimizer memory (used for T5).

#optimizers#distributed

Practise Deep Learning

214 interview questions in this topic.

Related questions