Spaces:
Sleeping
Sleeping
randomblock1
commited on
Commit
•
29a2d0c
1
Parent(s):
f49a4c3
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,8 @@ torch.set_default_device(device)
|
|
16 |
tokenizer = AutoTokenizer.from_pretrained("microsoft/phi-2", trust_remote_code=True)
|
17 |
model = AutoModelForCausalLM.from_pretrained(
|
18 |
"microsoft/phi-2",
|
19 |
-
torch_dtype=
|
|
|
20 |
device_map=device,
|
21 |
trust_remote_code=True,
|
22 |
)
|
|
|
16 |
tokenizer = AutoTokenizer.from_pretrained("microsoft/phi-2", trust_remote_code=True)
|
17 |
model = AutoModelForCausalLM.from_pretrained(
|
18 |
"microsoft/phi-2",
|
19 |
+
# torch_dtype=torch.float16 if has_gpu else torch.float32,
|
20 |
+
torch_dtype=torch.float32,
|
21 |
device_map=device,
|
22 |
trust_remote_code=True,
|
23 |
)
|