reflect max_new_tokens in `Seq2SeqTrainer`
# What does this PR do?

in most cases, VisionEncoderDecoderModel's `max_length` is set implicitly.
it leads to the problem if the model generates prediction given `max_new_tokens`.

this PR makes `max_new_tokens` handled as expected in `Seq2SeqTrainer. prediction_step()` in the case.

Fixes #18785

P.S. I can reproduce the issue if using `huggingface/transformers`.
but, using this PR with same codes to reproduce, no exceptions raised.

## 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#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?

- trainer: @sgugger

_The documentation is not available anymore as the PR was closed or merged._<|||||>@ydshieh, could you take a look at this when you have some time please? Thanks a lot!<|||||>Hi, @kumapo 

I believe it also requires a change in

https://github.com/huggingface/transformers/blob/main/src/transformers/trainer_seq2seq.py#L129

right?<|||||>@ydshieh, yes. at same time I believe `Seq2SeqTrainer.evaluate()` needs the same change.
<|||||>@sgugger, thank you for your feedback. I've updated the PR.<|||||>It seems there is an issue with your CircleCI permissions, the tests won't run.
Could you try refreshing your permissions as shown [here](https://support.circleci.com/hc/en-us/articles/360048210711-How-to-Refresh-User-Permissions-)?<|||||>@LysandreJik, I've done all steps to refresh circleci permission.
but it seems that nothing happens with tests. let me know if I missed something to be known.<|||||>Can you try pushing an empty commit on your branch to re-trigger the tests?
```
git commit -m "Trigger CI" --allow-empty
```<|||||>To pass the test, you can run 

```bash
make style
```
and commit the change.