Add support for gradient checkpointing in BERT (#4659)
* add support for gradient checkpointing in BERT
* fix unit tests
* isort
* black
* workaround for `torch.utils.checkpoint.checkpoint` not accepting bool
* Revert "workaround for `torch.utils.checkpoint.checkpoint` not accepting bool"
This reverts commit 5eb68bb804f5ffbfc7ba13c45a47717f72d04574.
* workaround for `torch.utils.checkpoint.checkpoint` not accepting bool
Co-authored-by:
Lysandre Debut <lysandre@huggingface.co>
Showing
Please register or sign in to comment