Skip to content

Commit

Permalink
fix(server): empty_cache when stopped
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierDehaene committed Jul 15, 2023
1 parent c58a0c1 commit a2cf1bd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions server/text_generation_server/models/flash_causal_lm.py
Original file line number Diff line number Diff line change
Expand Up @@ -991,6 +991,7 @@ def generate_token(

if stopped:
del batch
torch.cuda.empty_cache()
# No need to return a batch if we know that all requests stopped
return generations, None

Expand Down

0 comments on commit a2cf1bd

Please sign in to comment.