What is gradient checkpointing and its trade-off?
medium- Store activations at only a few 'checkpoint' layers instead of every layer.
- During backward, recompute the missing activations from the nearest checkpoint on demand.
- Memory drops from O(L) to O(sqrt(L)) with optimal checkpoints.
- Trade-off: ~30% more compute in the backward pass.
- Standard technique to fit larger models on limited GPUs (used in training large transformers).