Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
text-generation-inference
Commits
a2cf1bdb
Commit
a2cf1bdb
authored
Jul 15, 2023
by
OlivierDehaene
Browse files
fix(server): empty_cache when stopped
parent
c58a0c18
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
server/text_generation_server/models/flash_causal_lm.py
server/text_generation_server/models/flash_causal_lm.py
+1
-0
No files found.
server/text_generation_server/models/flash_causal_lm.py
View file @
a2cf1bdb
...
@@ -991,6 +991,7 @@ class FlashCausalLM(Model):
...
@@ -991,6 +991,7 @@ class FlashCausalLM(Model):
if
stopped
:
if
stopped
:
del
batch
del
batch
torch
.
cuda
.
empty_cache
()
# No need to return a batch if we know that all requests stopped
# No need to return a batch if we know that all requests stopped
return
generations
,
None
return
generations
,
None
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment