-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
[V1][Spec Decode] Ngram Spec Decode #12193
base: main
Are you sure you want to change the base?
Conversation
👋 Hi! Thank you for contributing to the vLLM project. 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 do one of these:
🚀 |
This pull request has merge conflicts that must be resolved before it can be |
This PR tries to add ngram spec decode to V1.
Major changes:
_spec_token_ids
inRequest
to track speculated tokens.model_runner
:3.1 Change the
_prepare_input
to also return the logits of speculated tokens.3.2 Change the
_prepare_input
to add speculated tokens as input tokens.3.3 Change the
execute_model
to generate multiple tokens per call. Concretely, it will add more than one tokens toinput_batch
andreq_state
.What is missing
Tasks out of the scope of this PR
Minor: There is a minimal example/test in
tests/v1/e2e/test_basic_specdecode.py
. You can check it for the current use and check correctness withpytest -s tests/v1/e2e/test_basic_specdecode.py
.