Better deleting all reference
import gc
del model
gc.collect()
torch.cuda.empty_cache()
# check memory
print(torch.cuda.memory_allocated())
del gen_nlp
del tokenizer_ctrl
gc.collect()
torch.cuda.empty_cache()
# check memory again
print(torch.cuda.memory_allocated())