YanshekWoo commited on
Commit
e79cdfd
1 Parent(s): 7b1042c

update generate parameters

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -41,7 +41,9 @@ def chat_func(input_utterance: str, history: Optional[List[str]] = None):
41
  max_new_tokens=30,
42
  top_p=0.95,
43
  do_sample=True,
44
- num_beams=4)[0]
 
 
45
 
46
  response = tokenizer.decode(output_ids, skip_special_tokens=True)
47
 
 
41
  max_new_tokens=30,
42
  top_p=0.95,
43
  do_sample=True,
44
+ num_beams=4,
45
+ repetition_penalty=1.2,
46
+ no_repeat_ngram_size=4)[0]
47
 
48
  response = tokenizer.decode(output_ids, skip_special_tokens=True)
49