Update app.py
Browse files
app.py
CHANGED
@@ -7,8 +7,7 @@ model = AutoModelForCausalLM.from_pretrained(
|
|
7 |
"microsoft/phi-3-mini-4k-instruct",
|
8 |
device_map="cpu",
|
9 |
torch_dtype="auto",
|
10 |
-
trust_remote_code=True
|
11 |
-
attn_implementation='eager',
|
12 |
)
|
13 |
tokenizer = AutoTokenizer.from_pretrained("microsoft/phi-3-mini-4k-instruct")
|
14 |
|
@@ -33,8 +32,7 @@ pipe = pipeline(
|
|
33 |
tokenizer="microsoft/phi-3-mini-4k-instruct",
|
34 |
device_map="auto", # Let Transformers automatically choose the best device
|
35 |
torch_dtype="float16", # Use half-precision for faster inference
|
36 |
-
trust_remote_code=True
|
37 |
-
attn_implementation='eager',
|
38 |
)
|
39 |
|
40 |
# Predefined conversation responses
|
|
|
7 |
"microsoft/phi-3-mini-4k-instruct",
|
8 |
device_map="cpu",
|
9 |
torch_dtype="auto",
|
10 |
+
trust_remote_code=True
|
|
|
11 |
)
|
12 |
tokenizer = AutoTokenizer.from_pretrained("microsoft/phi-3-mini-4k-instruct")
|
13 |
|
|
|
32 |
tokenizer="microsoft/phi-3-mini-4k-instruct",
|
33 |
device_map="auto", # Let Transformers automatically choose the best device
|
34 |
torch_dtype="float16", # Use half-precision for faster inference
|
35 |
+
trust_remote_code=True
|
|
|
36 |
)
|
37 |
|
38 |
# Predefined conversation responses
|