add gradient checkpointing for distilbert
# What does this PR do?

Fixes #9113 and #23219 

I just added the gradient checkpointint feature for DistilBert following the implementation in BERT.

This should be useful if one wants to train a relatively small model with extremly large batch size for better performance in application scenarios such as text retrieval or embeddings.

@ArthurZucker @sgugger
Hi @jordane95, thanks for opening this PR. 

Overall changes look OK to me. I can see from the issue discussion that gradient checkpointing was deliberately not added to DistilBert. In general, we try to avoid adding complexity to existing models, in particular their forward pass. Let's get @sgugger second opinion on whether this should be merged into main. 

For the quality checks, you'll need to run `make style` and push any changes made to this branch.<|||||>_The documentation is not available anymore as the PR was closed or merged._