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

Set replacement=True in torch.multinomial #858

Merged
merged 1 commit into from
Aug 25, 2023
Merged

Set replacement=True in torch.multinomial #858

merged 1 commit into from
Aug 25, 2023

Conversation

WoosukKwon
Copy link
Collaborator

@WoosukKwon WoosukKwon commented Aug 25, 2023

This PR sets replacement=True in torch.multinomial, which reverts back a change in #753. The change has affected the sampling quality when n is larger than 1. The fix aligns with HF Transformers, where the sequences are sampled independently. I've checked that the fix also aligns with the results from OpenAI API.

Copy link
Member

@zhuohan123 zhuohan123 left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the fix!

@WoosukKwon WoosukKwon merged commit 94d2f59 into main Aug 25, 2023
2 checks passed
@WoosukKwon WoosukKwon deleted the multinomial branch August 25, 2023 03:22
randxie pushed a commit to randxie/vllm that referenced this pull request Aug 29, 2023
liuyanyi pushed a commit to liuyanyi/vllm that referenced this pull request Sep 12, 2023
hongxiayang pushed a commit to hongxiayang/vllm that referenced this pull request Feb 13, 2024
sjchoi1 pushed a commit to casys-kaist-internal/vllm that referenced this pull request May 7, 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.

2 participants