lewtun HF staff commited on
Commit
685099d
1 Parent(s): 70740f7

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +1 -1
handler.py CHANGED
@@ -5,7 +5,7 @@ import torch
5
  class EndpointHandler:
6
  def __init__(self, path=""):
7
  # load model and processor from path
8
- self.model = AutoModelForCasualLM.from_pretrained(path, device_map="auto", load_in_8bit=True)
9
  self.tokenizer = AutoTokenizer.from_pretrained(path)
10
 
11
  def __call__(self, data: Dict[str, Any]) -> Dict[str, str]:
 
5
  class EndpointHandler:
6
  def __init__(self, path=""):
7
  # load model and processor from path
8
+ self.model = AutoModelForCausalLM.from_pretrained(path, device_map="auto", load_in_8bit=True)
9
  self.tokenizer = AutoTokenizer.from_pretrained(path)
10
 
11
  def __call__(self, data: Dict[str, Any]) -> Dict[str, str]: