Attempting to fix torch leak.

This commit is contained in:
Nicolas Patry 2023-08-12 09:06:49 +02:00
parent a2a913eec5
commit 89a4e723d2

View File

@ -659,6 +659,7 @@ class CausalLM(Model):
# We finished all generations in the batch; there is no next batch
if stopped:
torch.cuda.empty_cache()
return generations, None
# Slice unused values from prefill