Skip to content

Request: Providing gen_kwargs for Seq2SeqTrainer #19777

Description

@atyshka

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions