-
Notifications
You must be signed in to change notification settings - Fork 26.2k
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
Fix Constrained beam search duplication and weird output issue #17814
Fix Constrained beam search duplication and weird output issue #17814
Conversation
…thesis duplication between topk and advance
…am scores instead of token scores
The documentation is not available anymore as the PR was closed or merged. |
@cwkeam - do you have an idea here? |
Good catch @boy2000-007man !! @patrickvonplaten I just read through the issue and saw the code changes and they're all right-on. Thanks for finding these problems! |
Thank you for this fix! I found this pull request while I was searching to figure out why constrained beam search was churning out such repetitive results on 4.20.1. Installing the current repo of transformers fixed this immediately! |
…ngface#17814) * fix(ConstrainedBeamSearchScorer.step_sentence_constraint): avoid hypothesis duplication between topk and advance * fix(GenerationMixin.constrained_beam_search): appropriately assign beam scores instead of token scores
…ngface#17814) * fix(ConstrainedBeamSearchScorer.step_sentence_constraint): avoid hypothesis duplication between topk and advance * fix(GenerationMixin.constrained_beam_search): appropriately assign beam scores instead of token scores
What does this PR do?
Fixes # (issue)
#17812
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
@patrickvonplaten