zzz99 commited on
Commit
c2f195f
1 Parent(s): 4ecb8a8

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +2 -2
handler.py CHANGED
@@ -41,9 +41,9 @@ class EndpointHandler:
41
 
42
  # pass inputs with all kwargs in data
43
  if parameters is not None:
44
- outputs = self.model.generate(inputs, max_new_tokens=880, num_return_sequences=1, eos_token_id=self.tokenizer.eos_token_id, **parameters)
45
  else:
46
- outputs = self.model.generate(inputs, max_new_tokens=880, num_return_sequences=1, eos_token_id=self.tokenizer.eos_token_id)
47
 
48
  # postprocess the prediction
49
  prediction = self.tokenizer.decode(outputs[0][len(inputs[0]):], skip_special_tokens=True)
 
41
 
42
  # pass inputs with all kwargs in data
43
  if parameters is not None:
44
+ outputs = self.model.generate(inputs, num_return_sequences=1, eos_token_id=self.tokenizer.eos_token_id, **parameters) # removed max_new_tokens=880, will test and pass in max_new_tokens in config later
45
  else:
46
+ outputs = self.model.generate(inputs, num_return_sequences=1, eos_token_id=self.tokenizer.eos_token_id)
47
 
48
  # postprocess the prediction
49
  prediction = self.tokenizer.decode(outputs[0][len(inputs[0]):], skip_special_tokens=True)