Fix t5 shard on TPU Pods
The current script doesn't work properly on a TPU pod because the global batch is not divided correctly per host.
This pull request fixes this issue by dividing the global batch to each host before it is shared on each host.

Fixes # (issue)
https://github.com/huggingface/transformers/issues/16470

## 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#start-contributing-pull-requests),
      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.
- [ ] 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?

Models:

-   t5: @patrickvonplaten, @patil-suraj

_The documentation is not available anymore as the PR was closed or merged._<|||||>This looks good to me!

@patil-suraj @borisdayma - could you take a look here?<|||||>Yes this approach works!<|||||>Thinking about it I think there could be some issues with last batch so we probably need to ensure they all have same number of items and that they are multiple of the number of local devices.<|||||>@borisdayma 
This line already makes sure that all batches are of same length.

https://github.com/huggingface/transformers/blob/2831826bc60ee11b86179252ffc8401cb03c5904/examples/flax/language-modeling/run_t5_mlm_flax.py#L857