• Iz Beltagy's avatar
    Add support for gradient checkpointing in BERT (#4659) · 90f4b245
    Iz Beltagy authored
    
    
    * 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: default avatarLysandre Debut <lysandre@huggingface.co>
    90f4b245
configuration_bert.py 8.64 KB