-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
[sleep mode] clear pytorch cache after sleep #15248
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
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 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 🚀 |
Signed-off-by: Lionel Villard <villard@us.ibm.com> Signed-off-by: <villard@us.ibm.com>
9b94ec8
to
923ef78
Compare
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.
Intuitively this makes total sense. But I don't know if there could be any side effects.
Also LGTM but would also be good to get a nod from @youkaichao. |
i think you are clearing some buffers for sampling logits. it works, but people have to be careful, because when you wake up the engine, and serve the requests, samplers will allocate that part of memory again. |
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 if you want to reclaim as much memory as possible when sleeping.
Can we merge this PR? |
Signed-off-by: <villard@us.ibm.com> Signed-off-by: xinyuxiao <xinyuxiao2024@gmail.com>
Signed-off-by: <villard@us.ibm.com> Signed-off-by: Louis Ulmer <ulmerlouis@gmail.com>
Signed-off-by: <villard@us.ibm.com>
Signed-off-by: <villard@us.ibm.com>
Signed-off-by: <villard@us.ibm.com> Signed-off-by: Mu Huai <tianbowen.tbw@antgroup.com>
Clear PyTorch cache right after putting the instance to sleep.
For ibm-granite/granite-20b-code-instruct-8k, memory use before this fix is:
And with this fix: