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

add top_k option to LogitsProcessor new method #2183

Conversation

jorgeantonio21
Copy link
Contributor

Adds an optional top_k parameter to LogitsProcessor, so we allow top_k sampling externally.

@LaurentMazare
Copy link
Collaborator

Did you try using from_sampling? The idea was to use this new function when one wants to be able to set all the different options (there are a couple examples in the codebase) and not break compatibility for the existing function.

@jorgeantonio21
Copy link
Contributor Author

I see, I understand now how to deal with this, thanks for the explanation

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