Fix: Raise informative exception when prefix_allowed_tokens_fn return empty set of tokens#27797
Merged
gante merged 2 commits intoDec 8, 2023
Conversation
5 tasks
Contributor
Author
|
The failing tests seem to be irrelevant |
ArthurZucker
approved these changes
Dec 4, 2023
Collaborator
|
Rebase on main will help, It will get fix there |
Saibo-creator
force-pushed
the
fix_empty_prefix_allowed_tokens_fn
branch
from
December 7, 2023 07:18
13f325f to
18f4667
Compare
Saibo-creator
force-pushed
the
fix_empty_prefix_allowed_tokens_fn
branch
from
December 7, 2023 13:40
18f4667 to
8028126
Compare
Contributor
Author
|
@ArthurZucker Rebased |
gante
approved these changes
Dec 7, 2023
gante
left a comment
Contributor
There was a problem hiding this comment.
@Saibo-creator perfect, thank you for iterating 💛
Contributor
|
(I'd commit Arthur's suggestion, as it saves a redundant computation :) ) |
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
Co-authored-by: Arthur <[email protected]>
Contributor
Author
@gante |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes #27676 #22890
Before submitting
Pull Request section?
prefix_allowed_tokens_fndo not constrain when all allowed tokens have scores of-inf#22890 and RuntimeError with prefix_allowed_tokens_fn and do_sample=True When Allowed Tokens List is Empty #27676Who can review?
@gante @ArthurZucker