Skip to content
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

Release the memory / GPU memory after usage. #1667

Open
GalaxieT opened this issue Aug 11, 2022 · 2 comments
Open

Release the memory / GPU memory after usage. #1667

GalaxieT opened this issue Aug 11, 2022 · 2 comments

Comments

@GalaxieT
Copy link

Hi!

I was trying to get pretrained embeddings by encoding some sentence, but I noticed that the memory and GPU memory would not be released after encoding and would be kept until the whole program ended (even if the next parts are not relavant to the pretrained model). So I wonder is there any method to inform the model to release all the memory resources?

@bandoos
Copy link

bandoos commented Apr 24, 2023

Hello :) Anyone has news/suggestions on this problem?

@aadityabhatia
Copy link

aadityabhatia commented Feb 19, 2024

Have you tried using start_multi_process_pool and then stop_multi_process_pool?

Ref: https://www.sbert.net/docs/package_reference/SentenceTransformer.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants