Commit ·
719cd8c
1
Parent(s): 8c26326
test on base phi
Browse files- handler.py +1 -1
handler.py
CHANGED
|
@@ -5,7 +5,7 @@ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
|
|
| 5 |
|
| 6 |
class EndpointHandler():
|
| 7 |
def __init__(self, path=""):
|
| 8 |
-
model = AutoModelForCausalLM.from_pretrained("
|
| 9 |
tokenizer = AutoTokenizer.from_pretrained("microsoft/Phi-3-mini-128k-instruct")
|
| 10 |
self.pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
|
| 11 |
|
|
|
|
| 5 |
|
| 6 |
class EndpointHandler():
|
| 7 |
def __init__(self, path=""):
|
| 8 |
+
model = AutoModelForCausalLM.from_pretrained("microsoft/Phi-3-mini-128k-instruct", device_map="auto", torch_dtype=, trust_remote_code=True)
|
| 9 |
tokenizer = AutoTokenizer.from_pretrained("microsoft/Phi-3-mini-128k-instruct")
|
| 10 |
self.pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
|
| 11 |
|