Implement Gradient Checkpointing in PyTorch
Hardalignment-trainingauto-graded
Trade compute for memory by recomputing intermediate activations during backward instead of storing them all.
Solve it
Check your answer
The grader verifies properties of your implementation, so a correct solution written differently from ours still passes.
pip install torchleet
from torchleet import check
check("gradient-checkpointing", CheckpointFunction, checkpoint)