Skip to content

gpu memory does not get released with max_loaded_models #92

@Quesstor

Description

@Quesstor

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")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions