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

[Speculative decoding] Support target-model logprobs #4378

Merged
merged 41 commits into from
May 3, 2024

Conversation

cadedaniel
Copy link
Collaborator

@cadedaniel cadedaniel commented Apr 25, 2024

This PR allows vLLM to return correct log-probabilities of sampled tokens when speculative decoding is enabled. In addition, if the user specifies logprobs in their request, the correct top-k logprobs are returned.

The log-probabilities are expected to be equal to the log-probabilities when speculative decoding is not used.

Testing

@rkooo567
Copy link
Collaborator

btw, warning; there willl be a big sampler refactoring in this PR; #4309

@cadedaniel
Copy link
Collaborator Author

thanks for heads up; I think I can keep it decoupled

@cadedaniel cadedaniel changed the title [WIP] [Speculative decoding] Support target-model logprobs [Speculative decoding] Support target-model logprobs May 2, 2024
@cadedaniel cadedaniel marked this pull request as ready for review May 2, 2024 19:01
Copy link
Collaborator

@Yard1 Yard1 left a comment

Choose a reason for hiding this comment

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

This looks good to me, have you ran profiling to see the perf impact?

@richardliaw
Copy link
Collaborator

@cadedaniel can we get this merged today?

@cadedaniel
Copy link
Collaborator Author

@richardliaw yep

@Yard1 I benchmarked and there is room to optimize. I feel we should follow up once we have E2E spec decode numbers (the implementation is reasonably efficient)

@cadedaniel cadedaniel merged commit ab50275 into vllm-project:main May 3, 2024
59 checks passed
z103cb pushed a commit to z103cb/opendatahub_vllm that referenced this pull request May 7, 2024
dtrifiro pushed a commit to opendatahub-io/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.

None yet

4 participants