AmaadMartin commited on
Commit
4b95965
·
verified ·
1 Parent(s): f2f138e

Upload handler.py

Browse files
Files changed (1) hide show
  1. handler.py +2 -2
handler.py CHANGED
@@ -18,7 +18,7 @@ class EndpointHandler():
18
  device_map="cuda",
19
  trust_remote_code=True,
20
  fp16=True).eval()
21
- tokenizer = transformers.AutoTokenizer.from_pretrained(
22
  path,
23
  cache_dir=None,
24
  model_max_length=2048,
@@ -26,7 +26,7 @@ class EndpointHandler():
26
  use_fast=False,
27
  trust_remote_code=True,
28
  )
29
- tokenizer.pad_token_id = tokenizer.eod_id
30
  return
31
 
32
  def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
 
18
  device_map="cuda",
19
  trust_remote_code=True,
20
  fp16=True).eval()
21
+ self.tokenizer = transformers.AutoTokenizer.from_pretrained(
22
  path,
23
  cache_dir=None,
24
  model_max_length=2048,
 
26
  use_fast=False,
27
  trust_remote_code=True,
28
  )
29
+ self.tokenizer.pad_token_id = self.tokenizer.eod_id
30
  return
31
 
32
  def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]: