mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-04-24 16:32:12 +00:00
Attempting to fix torch leak.
This commit is contained in:
parent
a2a913eec5
commit
89a4e723d2
@ -659,6 +659,7 @@ class CausalLM(Model):
|
|||||||
|
|
||||||
# We finished all generations in the batch; there is no next batch
|
# We finished all generations in the batch; there is no next batch
|
||||||
if stopped:
|
if stopped:
|
||||||
|
torch.cuda.empty_cache()
|
||||||
return generations, None
|
return generations, None
|
||||||
|
|
||||||
# Slice unused values from prefill
|
# Slice unused values from prefill
|
||||||
|
Loading…
Reference in New Issue
Block a user