Skip to content

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
@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
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