Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,8 +5,8 @@ import torch
|
|
| 5 |
|
| 6 |
@st.cache(allow_output_mutation=True)
|
| 7 |
def define_model():
|
| 8 |
-
model = AutoModelForCausalLM.from_pretrained("facebook/opt-
|
| 9 |
-
tokenizer = AutoTokenizer.from_pretrained("facebook/opt-
|
| 10 |
return model, tokenizer
|
| 11 |
|
| 12 |
@st.cache(allow_output_mutation=True)
|
|
|
|
| 5 |
|
| 6 |
@st.cache(allow_output_mutation=True)
|
| 7 |
def define_model():
|
| 8 |
+
model = AutoModelForCausalLM.from_pretrained("facebook/opt-1.3b", torch_dtype=torch.float16).cuda()
|
| 9 |
+
tokenizer = AutoTokenizer.from_pretrained("facebook/opt-1.3b", use_fast=False)
|
| 10 |
return model, tokenizer
|
| 11 |
|
| 12 |
@st.cache(allow_output_mutation=True)
|