Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ import torch
|
|
7 |
model_name = "microsoft/Phi-3-mini-128k-instruct"
|
8 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
9 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
10 |
-
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.float16, device_map='cuda')
|
11 |
|
12 |
|
13 |
model = model.to('cuda:0')
|
|
|
7 |
model_name = "microsoft/Phi-3-mini-128k-instruct"
|
8 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
9 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
10 |
+
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.float16, device_map='cuda', trust_remote_code=True)
|
11 |
|
12 |
|
13 |
model = model.to('cuda:0')
|