Flax implementation of BART contain NaN in hidden_states 
### System Info

While implementing Donut model #19831, one of my test was failing `test_from_pretrained_save_pretrained`, while debugging the testcase failure, It is happening because the test is trying to compare nan with nan which causes the failure, on tracing the root cause, it came down to this line [`jnp.full(attention_mask.shape, float("-inf")).astype(self.dtype)`](https://github.com/huggingface/transformers/blob/fdffee8a601d0408c7e0f57fbb56217f8b57e62a/src/transformers/models/mbart/modeling_flax_mbart.py#L386), `float("-inf")` is causing the `dot_product_attention_weights` to return NaN instead of 0, which is getting cascaded downstream. Since this code is copied from BART, and that code has been copied to several different models (OPT, PEGASUS, BLENDERBOT etc), I am raising this issue against BART

IMHO, we should replace `float("-inf")` with `-1e10` as is the case for multiple different model, RoBerta, if the maintainers agree with this understanding and solution, I can raise a quick PR to fix the same, or otherwise please suggest a solution

@patil-suraj @patrickvonplaten 

### Who can help?

_No response_

### Information

- [ ] The official example scripts
- [X] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

Run testcase from my branch in the above mentioned PR

### Expected behavior

Hidden States should contain 0 instead of instead of NaN
@ArthurZucker and also @sanchit-gandhi since you know Flax Bart quite well <|||||>Hey @amankhandelia - the test of interest passes for the current BART and BART-derived models, so I wonder whether the issue is with the BART model or rather the mBART one? In general, I'm happy with the notion of changing the mask value from `-inf` to a large non-negative number, I just want to determine whether the issue lies with BART or FlaxMBartForCausalLM!

I've noticed in your PR that you're adding FlaxMBartForCausalLM as well as the Flax DONUT model in the same PR (https://github.com/huggingface/transformers/pull/19831). Perhaps you could first add FlaxMBartForCausalLM in a smaller separate PR? We could then run through the failing test together and try to assert whether it's an issue with FlaxMBartForCausalLM or Flax BART and fix any other issues that crop up 🤗<|||||>Hey @sanchit-gandhi, thanks for the feedback, 
Makes sense, will raise a separate PR for the FlaxMBartForCausalLM and check the same.<|||||>Hey @amankhandelia, thanks for understanding! Feel free to tag me on the PR as soon as it's ready and I'll try to get you a review ASAP!<|||||>This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.