derek-thomas HF staff commited on
Commit
e888c38
1 Parent(s): d29dd9f

Fixing local mistake

Browse files
Files changed (1) hide show
  1. handler.py +5 -7
handler.py CHANGED
@@ -27,13 +27,11 @@ class EndpointHandler:
27
 
28
  self.device = "cuda" if torch.cuda.is_available() else "cpu"
29
 
30
- # self.tokenizer = AutoTokenizer.from_pretrained(path)
31
- # self.model = AutoModelForCausalLM.from_pretrained(path, device_map="auto",
32
- # offload_folder='offload',
33
- # trust_remote_code=True,
34
- # load_in_8bit=True)
35
- self.tokenizer = tokenizer
36
- self.model = model
37
 
38
  def __call__(self, data: Dict[str, Any]) -> Dict[str, Any]:
39
 
 
27
 
28
  self.device = "cuda" if torch.cuda.is_available() else "cpu"
29
 
30
+ self.tokenizer = AutoTokenizer.from_pretrained(path)
31
+ self.model = AutoModelForCausalLM.from_pretrained(path, device_map="auto",
32
+ offload_folder='offload',
33
+ trust_remote_code=True,
34
+ load_in_8bit=True)
 
 
35
 
36
  def __call__(self, data: Dict[str, Any]) -> Dict[str, Any]:
37