Spaces:
Paused
Paused
Commit
·
084a525
1
Parent(s):
59bf219
Update app_v1.py
Browse files
app_v1.py
CHANGED
@@ -3,7 +3,13 @@ from transformers import AutoTokenizer
|
|
3 |
from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
|
4 |
from huggingface_hub import snapshot_download
|
5 |
import os
|
6 |
-
import
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
cwd = os.getcwd()
|
9 |
cachedir = cwd + '/cache'
|
|
|
3 |
from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
|
4 |
from huggingface_hub import snapshot_download
|
5 |
import os
|
6 |
+
import torch
|
7 |
+
|
8 |
+
# Clear up some memory
|
9 |
+
torch.cuda.empty_cache()
|
10 |
+
|
11 |
+
# Try reducing the number of threads PyTorch uses
|
12 |
+
torch.set_num_threads(1)
|
13 |
|
14 |
cwd = os.getcwd()
|
15 |
cachedir = cwd + '/cache'
|