Fix gradient checkpointing bug in LongT5
This PR fixes a bug that a user can encounter while using generate and models that use gradient_checkpointing.

Fixes Issue https://github.com/huggingface/transformers/issues/21737

cc @younesbelkada or @gante
No problem! Yeah I added it because I thought it was incorrectly omitted from LongT5Stack. Should it be removed?<|||||>_The documentation is not available anymore as the PR was closed or merged._<|||||>I think your changes are fine and it was something we forgot to add on our side at the first place ! 