-
-
Notifications
You must be signed in to change notification settings - Fork 11.4k
【Spec Decode】support async scheduling with eagle speculative decoding #25872
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
【Spec Decode】support async scheduling with eagle speculative decoding #25872
Conversation
|
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run You ask your reviewers to trigger select CI tests on top of Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can either: Add If you have any questions, please reach out to us on Slack at https://slack.vllm.ai. 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces support for asynchronous scheduling with Eagle speculative decoding. The changes are extensive, touching the scheduler, model runner, and speculative decoding logic. The core of the implementation is to make the speculative decoding flow asynchronous to improve performance, primarily by avoiding CPU-GPU synchronizations. This is achieved by using GPU events for synchronization, caching intermediate GPU tensors between steps, and introducing a 'fix-up' step to correct token counts based on rejected speculative tokens from the previous step. The changes appear to be well-thought-out and correctly implement the asynchronous logic. I have reviewed the code and did not find any issues of high or critical severity.
|
Is it duplicate of this PR(#24799)? |
Signed-off-by: guozelin <[email protected]>
…tokens = 0 Signed-off-by: guozelin <[email protected]>
…e tokens placeholders Signed-off-by: guozelin <[email protected]>
94fa608 to
ec5fae1
Compare
…licts Signed-off-by: guozelin <[email protected]>
ec5fae1 to
a6e4caf
Compare
|
This pull request has merge conflicts that must be resolved before it can be |
Previous work 19970 and 23569 solved async scheduling with common scenarios leaving speculative decoding not yet suppoted.
Purpose
this pull request targets to make eagle speculative decoding work with async-scheduling.
Test Plan
we conducted benchmark with following command under nvidia L20 machine:
benchmark server
VLLM_ATTENTION_BACKEND=FLASH_ATTN vllm serve meta-llama/Llama-3.1-8B-Instruct --speculative-config '{"method": "eagle3", "model": "yuhuili/EAGLE3-LLaMA3.1-Instruct-8B", "num_speculative_tokens": 4, "disable_padded_drafter_batch": false}' --max-model-len 2048 --no-enable-prefix-caching --async-schedulingbenchmark client
vllm bench serve --port 8000 --save-result --backend vllm --model meta-llama/Llama-3.1-8B-Instruct --endpoint /v1/completions --dataset-name hf --dataset-path philschmid/mt-bench --num-prompts 80 --max-concurrency 1Test Result
mean TPOT/ITL peformance gain up to 3.4%.


step gaps before optimization:
step gaps after optimization:
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.