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

gpu memory does not get released with max_loaded_models #92

Open
Quesstor opened this issue May 26, 2023 · 0 comments
Open

gpu memory does not get released with max_loaded_models #92

Quesstor opened this issue May 26, 2023 · 0 comments

Comments

@Quesstor
Copy link

Running the example code and watching watch -n .3 nvidia-smi you can see that the memory keeps increasing and is not released on the gpu.

Did i miss something here?

model = EasyNMT("opus-mt", max_loaded_models=1)

model.translate("Hallo, das ist ein Satz.", target_lang="en", source_lang="de")
model.translate("Hallo, das ist ein Satz.", target_lang="fr", source_lang="de")

time.sleep(3)
gc.collect()
torch.cuda.empty_cache()
time.sleep(3)

model.translate("Hallo, das ist ein Satz.", target_lang="nl", source_lang="de")
model.translate("Hallo, das ist ein Satz.", target_lang="it", source_lang="de")
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

1 participant