Update handler.py
Browse files- handler.py +1 -1
handler.py
CHANGED
|
@@ -7,7 +7,7 @@ import torch
|
|
| 7 |
class EndpointHandler():
|
| 8 |
def __init__(self, path=""):
|
| 9 |
# load the model
|
| 10 |
-
self.model =
|
| 11 |
"gpt2", torch_dtype=torch.float16, output_hidden_states=True
|
| 12 |
)
|
| 13 |
self.model = self.model.cuda()
|
|
|
|
| 7 |
class EndpointHandler():
|
| 8 |
def __init__(self, path=""):
|
| 9 |
# load the model
|
| 10 |
+
self.model = AutoModelForCausalLM.from_pretrained(
|
| 11 |
"gpt2", torch_dtype=torch.float16, output_hidden_states=True
|
| 12 |
)
|
| 13 |
self.model = self.model.cuda()
|