Pass missing arguments to `SeamlessM4Tv2ConformerEncoderLayer.forward()` when gradient checkpointing is enabled
Author: anferico
Pull request: yes

# What does this PR do?
Fixes a bug for which if gradient checkpointing is enabled, `SeamlessM4Tv2ConformerEncoderLayer.forward()` is called with some missing arguments.

Fixes #31028 

## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
      Pull Request section?
- [x] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [x] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?


## Who can review?

@ylacombe 


Comments:
@ylacombe turns out the same problem existed in v1 too 🤓 Just pushed a new commit fixing that

Great! 
@amyeroberts, the PR is ready for a review. Thanks in advance!

The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_31945). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@anferico Thanks for adding this fix! 

This should be caught in tests. Could you check the test suit for this model to make sure the forward pass with gradient checkpoint is tested?

@amyeroberts The gradient checkpointing-related tests are currently being skipped for both SeamlessM4T [v1](https://github.com/huggingface/transformers/blob/72fb02c47dbbe1999ae105319f24631cad6e2e00/tests/models/seamless_m4t/test_modeling_seamless_m4t.py#L494) and [v2](https://github.com/huggingface/transformers/blob/72fb02c47dbbe1999ae105319f24631cad6e2e00/tests/models/seamless_m4t_v2/test_modeling_seamless_m4t_v2.py#L510).

Aside from that, this issue kinda calls for more robust tests, because the [current test suite](https://github.com/huggingface/transformers/blob/72fb02c47dbbe1999ae105319f24631cad6e2e00/tests/test_modeling_common.py#L777) for gradient checkpointing only checks if gradients are computed for each parameter, but it could never have spotted the edge case where the `model.forward()` method behaves differently depending on whether GC is enabled or not. I understand it might be a big effort, but ideally we would require every function that is affected by GC be tested twice: once with GC enabled and once with GC disabled, making sure that the outputs are exactly the same given certain inputs. What do you think?

@anferico OK, sounds like the work is a bit more involved. Could you open an issue detailing that the GC tests should be updated? This way we keep track of the work and we can merge this without being blocked

@amyeroberts done! #32063 

@anferico Awesome - thank you!