Spaces:
Runtime error
Runtime error
shrimantasatpati
commited on
Commit
•
7f154e0
1
Parent(s):
cade733
Updated app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import streamlit as st
|
|
|
2 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
3 |
import torch
|
4 |
|
@@ -11,7 +12,7 @@ tokenizer = AutoTokenizer.from_pretrained(
|
|
11 |
model = AutoModelForCausalLM.from_pretrained(
|
12 |
# "kroonen/phi-2-GGUF",
|
13 |
"microsoft/phi-2",
|
14 |
-
|
15 |
trust_remote_code=True,
|
16 |
torch_dtype=torch.float32
|
17 |
)
|
|
|
1 |
import streamlit as st
|
2 |
+
import transformers
|
3 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
4 |
import torch
|
5 |
|
|
|
12 |
model = AutoModelForCausalLM.from_pretrained(
|
13 |
# "kroonen/phi-2-GGUF",
|
14 |
"microsoft/phi-2",
|
15 |
+
device_map="auto",
|
16 |
trust_remote_code=True,
|
17 |
torch_dtype=torch.float32
|
18 |
)
|