Seq2SeqTrainingArguments.generation_config not json serializable
### System Info

👋

Following #22323, the `Seq2SeqTrainingArguments` `generation_config` attribute can be a `GenerationConfig` object.
When saving a `Seq2SeqTrainingArguments` object as json (as done during training / with tensorboard), it is first converted to a dictionary. But a `GenerationConfig` is not serializable --> error

### Who can help?

cc @gante @sgugger 

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

```Python
generation_config = GenerationConfig(
    max_new_tokens=64,
    top_k=20,
    top_p=0.9,
)
gen_training_args = Seq2SeqTrainingArguments(generation_config=generation_config)

as_dict = gen_finetune_training_args.to_dict()
as_json_str = gen_finetune_training_args.to_json_string()  # error here
```

### Expected behavior

To fix this, two possible solutions are :

1. Modify the expected types of `generation_config` to `[str, Path, dict]`, possibly converting arguments passed as `GenerationConfig` to dictionaries in `__post_init__`, and modify the behavior of `Seq2SeqTrainer.load_generation_config` to handle dictionaries;
2. Make `Seq2SeqTrainingArguments` override [`to_dict()`](https://github.com/huggingface/transformers/blob/03462875cc2d6506eb66a74de7d19b93ce968596/src/transformers/training_args.py#L1833) (or directly modify in `TrainingArguments`), to recursively convert non-json-serializable attributes to dictionaries.

Which sounds better do you think ? Or maybe you have a better one.
In any case I can handle it, as I feel responsible for this error.
Hey @Natooz 👋 

We're more responsible than you, since we are supposed to catch that sort of issue in advance during the review process ;) But that's okay! It's normal to create bugs while trying to move forward at a good pace 🚀 

I believe that option 2 (recursively converting attributes to dictionaries) would be preferable. @sgugger, WDYT?<|||||>Option 2 is fine, but just on `Seq2SeqTrainingArguments`, to replace the generation config by `generation_config.to_dict()`.