-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
[MISC] Use non-blocking transfer in prepare_input #7172
Conversation
👋 Hi! Thank you for contributing to the vLLM project. Once the PR is approved and ready to go, please make sure to run full CI as it is required to merge (or just use auto-merge). To run full CI, you can do one of these:
🚀 |
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.
lgtm
Signed-off-by: Alvant <[email protected]>
This PR uses non-blocking data transfer in prepare_input. This is beneficial because we transfer several tensors to GPU in prepare_input. Here are some benchmark results using Llama-3.1-8B-Instruct on 1xH100:
Batching
Command:
Result (I observed some variants so if you ran this multiple times the throughput is actually ranging from 8.15~8.34).
Serving
I used a different benchmark framework so no commands here, but the settings are as follows:
Reference: https://pytorch.org/tutorials/intermediate/pinmem_nonblock.html
cc @youkaichao