To release the resources used by model instances, you can simply delete the object, e.g.:
In some cases, you might want to temporarily unload the model and load it back later. The
Translator object provides the methods
load_model for this purpose. The model can be either fully unloaded or moved to the CPU memory.