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

Check if allowed tokens is None #2694

Merged
merged 4 commits into from
Oct 28, 2024

Conversation

aW3st
Copy link

@aW3st aW3st commented Oct 25, 2024

Bug fix for the rebased PR

Comment on lines +503 to +504
if allowed_tokens is not None:
mask[:, allowed_tokens] = 0
Copy link
Author

Choose a reason for hiding this comment

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

@Narsil Generate.tokens has type Optional[List[int]], so I think we need to add this check.

@Narsil Narsil merged commit 7bc2c97 into huggingface:upgrade-outlines Oct 28, 2024
2 of 6 checks passed
@Narsil Narsil mentioned this pull request Oct 28, 2024
4 tasks
@aW3st aW3st mentioned this pull request Oct 28, 2024
5 tasks
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.

2 participants