Why does the backward pass require more memory than the forward pass?
medium- Reverse-mode autodiff needs the intermediate activations from the forward pass to compute gradients (the chain rule uses them).
- So all activations are stored until backward finishes.
- Peak memory ≈ activations + gradients + optimizer state.
- Fixes for memory pressure: gradient checkpointing (recompute activations during backward instead of storing), mixed precision, model / ZeRO parallelism.