Fix RMSNormGated in Zamba2
Author: pglorio
Pull request: yes

# What does this PR do?

<!--
Congratulations! You've made it this far! You're not quite done yet though.

Once merged, your PR is going to appear in the release notes with the title you set, so make sure it's a great title that fully reflects the extent of your awesome contribution.

Then, please replace this with a description of the change and which issue is fixed (if applicable). Please also include relevant motivation and context. List any dependencies (if any) that are required for this change.

Once you're done, someone will review your PR shortly (see the section "Who can review?" below to tag some potential reviewers). They may suggest changes to make the code even better. If no one reviewed your PR after a week has passed, don't hesitate to post a new comment @-mentioning the same persons---sometimes notifications get lost.
-->

<!-- Remove if not applicable -->

This PR fixes `Zamba2RMSNormGated` to allow for `config.mamba_ngroups>1`. The Zamba2 7B checkpoints have `config.mamba_ngroups=2` so this change is necessary to have the correct forward pass.

I defined `Zamba2RMSNormGated` inside [modular_zamba2.py](https://github.com/huggingface/transformers/pull/35943/files#diff-94297873668a42780c28a94f5b612feef4b51307c11decbb9794f79a2b086f7aR73-R91) instead of importing it, as this differs from the definition in [modeling_mamba2.py](https://github.com/Zyphra/transformers_zamba/blob/cd304b5139198ac1c6ae822704347a7c645b6185/src/transformers/models/mamba2/modeling_mamba2.py#L210). The implementation in this PR is the torch version of the mamba-ssm implementation of the original mamba2 (used [here](https://github.com/state-spaces/mamba/blob/6b72c122713bb769cc82c6b8e6d019c53d27d6a1/mamba_ssm/modules/mamba2.py#L144) and torch implementation given [here](https://github.com/state-spaces/mamba/blob/60dadf2e0ee730ac337035d5533de10bc26e4847/mamba_ssm/ops/triton/layernorm_gated.py#L18)).


## Before submitting
- [X] 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?
- [ ] 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).
- [X] Did you write any new necessary tests?


## Who can review?

@ArthurZucker @Cyrilvallez 


Comments:
cc @molbap I think!

@ArthurZucker I think it was an oversight in the original implementation for Mamba2 over here - @pglorio shows the relevant code snippets that `ngroups` is indeed used in the gated rms norm, e.g. [here](https://github.com/state-spaces/mamba/blob/6b72c122713bb769cc82c6b8e6d019c53d27d6a1/mamba_ssm/modules/mamba2.py#L144-L145) and [here](https://github.com/state-spaces/mamba/blob/60dadf2e0ee730ac337035d5533de10bc26e4847/mamba_ssm/ops/triton/layernorm_gated.py#L28-L36).

I can't estimate how it changes the model tho and if slow tests would need to be changed accordingly.

Interesting. We have 1-1 matching results for the codestral model, so my intuition would say we removed it because the input args made it a nop but I might be wrong. 

I'll probably check some other time if logits match - maybe they indeed are equivalent 👀