Feature request
As far as I am aware, there is currently no way to customize the generation behavior when generation is run as part of the training loop. Seq2SeqTrainer.predict() takes a gen_kwargs argument to pass along to generate(), but there is no way to pass gen_kwargs to predict() when predict is called automatically as part of the training loop.
Motivation
Customizing generation may be necessary, doing this in the training loop as opposed to after training would be ideal.
Your contribution
I'm happy to contribute, the main question is how this could be elegantly integrated into the current Trainer API.
Feature request
As far as I am aware, there is currently no way to customize the generation behavior when generation is run as part of the training loop.
Seq2SeqTrainer.predict()takes agen_kwargsargument to pass along togenerate(), but there is no way to passgen_kwargstopredict()when predict is called automatically as part of the training loop.Motivation
Customizing generation may be necessary, doing this in the training loop as opposed to after training would be ideal.
Your contribution
I'm happy to contribute, the main question is how this could be elegantly integrated into the current Trainer API.