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

Fix bug in min_p sampling #513

Closed
wants to merge 2 commits into from
Closed

Fix bug in min_p sampling #513

wants to merge 2 commits into from

Conversation

hp-l33
Copy link

@hp-l33 hp-l33 commented Aug 3, 2024

There is a bug in min_p sampling in PR #135: The error a Tensor with X elements cannot be converted to Scalar is triggered in the line max_prob = logits_top[..., 0].item() when the batch size > 1.
I have implemented the correct min_p sampling by referencing huggingface/transformers#30639.

fix bug in min_p sampling
@hp-l33 hp-l33 marked this pull request as draft August 3, 2024 22:33
@hp-l33 hp-l33 closed this Aug 3, 2024
@hp-l33 hp-l33 reopened this Aug 3, 2024
@hp-l33 hp-l33 marked this pull request as ready for review August 3, 2024 22:52
@hp-l33 hp-l33 closed this by deleting the head repository Sep 8, 2024
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.

1 participant