Trainer Bug
### System Info

I might be wrong, but looks this line here: https://github.com/huggingface/transformers/blob/main/src/transformers/trainer_seq2seq.py#L176 introduces a bug. _gen_kwargs may not be an attribute for an instance. 


### 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, ...)
- [X] My own task or dataset (give details below)

### Reproduction

If we have a trainer that directly calls the function `prediction_step`, we'll have this error

### Expected behavior

no error is thrown when we call `prediction_step` function
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.