Skip to content

Consider a suppressed_tokens arg in generate() #975

Closed
@abheesht17

Description

@abheesht17

The user can optionally pass a suppressed_tokens arg to GPT-2/BART's generate() function. We will set the probability of these tokens to 0 (i.e., logits to -infinity), so that they aren't generated. This is super-useful in order to avoid generating a special token (like bos token) during generation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions