Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate: group_beam_search requires diversity_penalty>0.0 #24456

Merged
merged 2 commits into from
Jun 27, 2023

Conversation

gante
Copy link
Member

@gante gante commented Jun 24, 2023

What does this PR do?

While revisiting group_beam_search to review #24407, I noticed that we do not require diversity_penalty to be >0.0. If it is not >0.0, then group_beam_search degenerates to beam_search with num_beams=num_beams/num_beam_groups -- users exploring the method risk not seeing its potential.

With this exception, we ensure the degeneration case does not happen (and possibly nudge the users towards the docs)

@gante gante requested a review from sgugger June 24, 2023 17:38
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jun 24, 2023

The documentation is not available anymore as the PR was closed or merged.

Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@gante gante merged commit 5f3efdf into huggingface:main Jun 27, 2023
@gante gante deleted the diversity branch June 27, 2023 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants