imamnurby commited on
Commit
468fa88
1 Parent(s): d2f6a3f

Update backend_utils.py

Browse files
Files changed (1) hide show
  1. backend_utils.py +3 -1
backend_utils.py CHANGED
@@ -219,7 +219,9 @@ def generate_api_usage_patterns(generative_model, tokenizer, model_input, num_be
219
  model_output = generative_model.generate(
220
  model_input,
221
  num_beams=num_beams,
222
- num_return_sequences=num_return_sequences
 
 
223
  )
224
  api_usage_patterns = tokenizer.batch_decode(
225
  model_output,
 
219
  model_output = generative_model.generate(
220
  model_input,
221
  num_beams=num_beams,
222
+ num_return_sequences=num_return_sequences,
223
+ early_stopping=True,
224
+ max_legth=100
225
  )
226
  api_usage_patterns = tokenizer.batch_decode(
227
  model_output,