Fix model kwargs
Author: muellerzr
Pull request: yes

# What does this PR do?

Adds unused `**kwargs` to particular models so that `num_items_in_batch` can work as intended

Fixes https://github.com/huggingface/transformers/issues/35838


## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [ ] 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.
- [ ] 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?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@ArthurZucker 

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

Is it normal that some checks were not successful?

Finally ready to go, sorry it took me a bit, lots of models to triple check :sweat: 

<img width="872" alt="image" src="https://github.com/user-attachments/assets/57d7d296-04ac-4fc9-8fe6-83e91ae64f29" />
<img width="870" alt="image" src="https://github.com/user-attachments/assets/6338995b-8986-473e-8a77-bf9c21cd2891" />

This is not working for DonutSwinModel

Thanks @eljandoubi, to be more specific it's encoder/decoder models

I got this error on my AutoModelForSequenceClassification:
File ~/Documents/ML/.venv/lib/python3.13/site-packages/transformers/trainer.py:3698, in Trainer.training_step(self, model, inputs, num_items_in_batch)
   [3695](https://file+.vscode-resource.vscode-cdn.net/Users/zheka/Documents/ML/DLS/from%20MPS/News/~/Documents/ML/.venv/lib/python3.13/site-packages/transformers/trainer.py:3695)     return loss_mb.reduce_mean().detach().to(self.args.device)
   [3697](https://file+.vscode-resource.vscode-cdn.net/Users/zheka/Documents/ML/DLS/from%20MPS/News/~/Documents/ML/.venv/lib/python3.13/site-packages/transformers/trainer.py:3697) with self.compute_loss_context_manager():
-> [3698](https://file+.vscode-resource.vscode-cdn.net/Users/zheka/Documents/ML/DLS/from%20MPS/News/~/Documents/ML/.venv/lib/python3.13/site-packages/transformers/trainer.py:3698)     loss = self.compute_loss(model, inputs, num_items_in_batch=num_items_in_batch)
   [3700](https://file+.vscode-resource.vscode-cdn.net/Users/zheka/Documents/ML/DLS/from%20MPS/News/~/Documents/ML/.venv/lib/python3.13/site-packages/transformers/trainer.py:3700) del inputs
   [3701](https://file+.vscode-resource.vscode-cdn.net/Users/zheka/Documents/ML/DLS/from%20MPS/News/~/Documents/ML/.venv/lib/python3.13/site-packages/transformers/trainer.py:3701) if (
   [3702](https://file+.vscode-resource.vscode-cdn.net/Users/zheka/Documents/ML/DLS/from%20MPS/News/~/Documents/ML/.venv/lib/python3.13/site-packages/transformers/trainer.py:3702)     self.args.torch_empty_cache_steps is not None
   [3703](https://file+.vscode-resource.vscode-cdn.net/Users/zheka/Documents/ML/DLS/from%20MPS/News/~/Documents/ML/.venv/lib/python3.13/site-packages/transformers/trainer.py:3703)     and self.state.global_step % self.args.torch_empty_cache_steps == 0
   [3704](https://file+.vscode-resource.vscode-cdn.net/Users/zheka/Documents/ML/DLS/from%20MPS/News/~/Documents/ML/.venv/lib/python3.13/site-packages/transformers/trainer.py:3704) ):

TypeError: WiegthedTrainer.compute_loss() got an unexpected keyword argument 'num_items_in_batch'