-
-
Notifications
You must be signed in to change notification settings - Fork 6.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
[5/N][torch.compile] torch.jit.script --> torch.compile #10406
Conversation
Signed-off-by: youkaichao <youkaichao@gmail.com>
👋 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:
🚀 |
@@ -1770,7 +1770,7 @@ def capture( | |||
# Run the model a few times without capturing the graph. | |||
# This is to make sure that the captured graph does not include the | |||
# kernel launches for initial benchmarking (e.g., Triton autotune). | |||
# Note one iteration is not enough for torch.jit.script | |||
# Note one iteration is not enough for torch.compile |
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.
I think one warmup iteration should be enough for torch.compile
, but we can investigate and confirm later.
Signed-off-by: youkaichao <youkaichao@gmail.com>
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. Thanks!
…#10406) Signed-off-by: youkaichao <youkaichao@gmail.com> Signed-off-by: Manjul Mohan <manjul.mohan@ibm.com>
…#10406) Signed-off-by: youkaichao <youkaichao@gmail.com>
…#10406) Signed-off-by: youkaichao <youkaichao@gmail.com>
…#10406) Signed-off-by: youkaichao <youkaichao@gmail.com> Signed-off-by: Maxime Fournioux <55544262+mfournioux@users.noreply.github.com>
…#10406) Signed-off-by: youkaichao <youkaichao@gmail.com> Signed-off-by: rickyx <rickyx@anyscale.com>
…#10406) Signed-off-by: youkaichao <youkaichao@gmail.com> Signed-off-by: Tyler Michael Smith <tyler@neuralmagic.com>
…#10406) Signed-off-by: youkaichao <youkaichao@gmail.com>
…#10406) Signed-off-by: youkaichao <youkaichao@gmail.com>
Hey @youkaichao, I am running python 3.11 and cuda 12.4 and do a full build of vllm on my environment. My env spec is as following:
When I launch the vllm server, I get this error irrespective of the model type.
I have realised that it is coming from |
…#10406) Signed-off-by: youkaichao <youkaichao@gmail.com>
Hey @youkaichao, I observed that in VLM, the language model uses torch compile, but ViT does not, for example in Qwen2VL:
but in the definition of Qwen2VisionTransformer, there is no
I tried using torch compile directly on the Forward function of some modules in ViT, but there was no acceleration effect. Is it necessary to use torch compile for VLM's ViT? Will it have a speed-up effect? If so, how can it be achieved? Thanks for the advice. |
fixes #8536
and I also observe performance gain: