Spaces:
Runtime error
Runtime error
Commit
Β·
060d065
1
Parent(s):
0266d0b
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,9 @@ use_triton = False
|
|
15 |
|
16 |
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
|
17 |
|
18 |
-
device="cuda" if torch.cuda.is_available() else "cpu")
|
|
|
|
|
19 |
|
20 |
model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
|
21 |
use_safetensors=True,
|
|
|
15 |
|
16 |
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
|
17 |
|
18 |
+
device=("cuda" if torch.cuda.is_available() else "cpu")
|
19 |
+
#device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
20 |
+
#device = f'cuda:{cuda.current_device()}' if cuda.is_available() else 'cpu'
|
21 |
|
22 |
model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
|
23 |
use_safetensors=True,
|