2023-06-21
https://lightning.ai/pages/community/tutorial/faster-pytorch-training-by-reducing-peak-memory/
Faster PyTorch Training by Reducing Peak Memory. Update weights immediately after computing the gradients, instead of waiting for the entire backward pass to finish. This can significantly reduce peak memory usage and speed up training. Fuse backwards and optimizer steps into one operation.