aayush-shah
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -11,15 +11,17 @@ import gradio as gr
|
|
11 |
from time import time
|
12 |
|
13 |
|
14 |
-
model_id = "Esperanto/Protein-
|
15 |
-
|
16 |
model = AutoModelForCausalLM.from_pretrained(
|
17 |
model_id,
|
18 |
-
torch_dtype=torch.float16
|
|
|
|
|
19 |
)
|
20 |
|
21 |
-
|
22 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
23 |
|
24 |
tokenizer.pad_token = tokenizer.eos_token
|
25 |
tokenizer.padding_side = "left"
|
|
|
11 |
from time import time
|
12 |
|
13 |
|
14 |
+
model_id = "Esperanto/Protein-Phi-3-mini"
|
15 |
+
|
16 |
model = AutoModelForCausalLM.from_pretrained(
|
17 |
model_id,
|
18 |
+
torch_dtype=torch.float16,
|
19 |
+
trust_remote_code=True,
|
20 |
+
attn_implementation="flash_attention_2"
|
21 |
)
|
22 |
|
23 |
+
|
24 |
+
tokenizer = AutoTokenizer.from_pretrained("microsoft/Phi-3-mini-4k-instruct", trust_remote_code=True)
|
25 |
|
26 |
tokenizer.pad_token = tokenizer.eos_token
|
27 |
tokenizer.padding_side = "left"
|