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

top-p < 1 fails inf assertion #156

Open
artsobolev opened this issue Jan 17, 2024 · 1 comment
Open

top-p < 1 fails inf assertion #156

artsobolev opened this issue Jan 17, 2024 · 1 comment
Assignees

Comments

@artsobolev
Copy link
Contributor

When I set top-p in the arguments to a value less than 1, I have this assert failing. Which seems to make sense since this line puts them in.

What's the solution and what is the inf_mask needed for?

@donglixp donglixp self-assigned this Feb 26, 2024
@t1101675
Copy link
Contributor

inf_mask ensures that when the output distribution (probs) has zero values (like using top-p), logprobs will be assigned -float("inf") instead of nan.
You can try commenting out this line to use top-p.

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

No branches or pull requests

3 participants