-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Adding cascade inference to vLLM #10011
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:
🚀 |
Adding @yzh119 for comments too. |
Hey @raywanb thanks for the updates! With these new changes, it looks like the cascade inference will replace the old batch prefill/decode kernel API calls. Before we dive into the implementation details, I'd love to overcommunicate on the following:
|
Hey @elfiegg, Sorry, for the late reply.
Thanks! |
This pull request has merge conflicts that must be resolved before it can be |
window_left = sliding_window[0] if sliding_window is not None else -1 | ||
|
||
try: | ||
scale = getattr(model.model.layers[0].self_attn.attn.impl, "scale", |
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.
Do all models have the same naming convention for the scale attribute? Is it better to have a default value like 1.0
and a remark/warning instead of throwing an error?
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.
not sure if all models have that attribute. Updated the code to throw warning and a default value of None.
Check if 'self_attn.attn.impl' contains 'scale'.") from e | ||
|
||
try: | ||
logits_soft_cap = getattr( |
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.
Same as above
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.
as above
This pr adds cascade inference to vllm. Related to #8132 It should speedup inference when there are multiple requests that share the same prefix with a cold cache. Currently, the second level of cascade inference is not turned on yet. This is task 1 of milestone 1 for #8786.
Benchmarking Results Can be Found Here:
https://docs.google.com/spreadsheets/d/13d9m0iHKuWotKv_euTYNmEM6eyRDlvlyUqTuTosxZkY/edit?usp=sharing