Spaces:
Paused
Paused
austinsilveria
commited on
Commit
•
8247095
1
Parent(s):
4971af2
gc before empty cache
Browse files
app.py
CHANGED
@@ -36,8 +36,8 @@ def generate_text(prompt, max_new_tokens, top_k, top_p, use_tricksy):
|
|
36 |
tricksy_model.clear()
|
37 |
tricksy_model = None
|
38 |
time.sleep(.2)
|
39 |
-
torch.cuda.empty_cache()
|
40 |
gc.collect()
|
|
|
41 |
torch.cuda.reset_peak_memory_stats()
|
42 |
|
43 |
yield generated_text, stats_text
|
|
|
36 |
tricksy_model.clear()
|
37 |
tricksy_model = None
|
38 |
time.sleep(.2)
|
|
|
39 |
gc.collect()
|
40 |
+
torch.cuda.empty_cache()
|
41 |
torch.cuda.reset_peak_memory_stats()
|
42 |
|
43 |
yield generated_text, stats_text
|