Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,8 +4,11 @@ import torch
|
|
4 |
|
5 |
# Load tokenizer and model
|
6 |
tokenizer = AutoTokenizer.from_pretrained("microsoft/phi-2", trust_remote_code=True)
|
|
|
|
|
|
|
7 |
model = AutoModelForCausalLM.from_pretrained(
|
8 |
-
"microsoft/phi-2", torch_dtype=
|
9 |
)
|
10 |
|
11 |
|
|
|
4 |
|
5 |
# Load tokenizer and model
|
6 |
tokenizer = AutoTokenizer.from_pretrained("microsoft/phi-2", trust_remote_code=True)
|
7 |
+
|
8 |
+
|
9 |
+
|
10 |
model = AutoModelForCausalLM.from_pretrained(
|
11 |
+
"microsoft/phi-2", torch_dtype=torch.float32, device_map="auto", trust_remote_code=True
|
12 |
)
|
13 |
|
14 |
|