Add additive_repetition_penalty sampler setting. (#3627)
This commit is contained in:
parent
6086768309
commit
4440f87722
13 changed files with 34 additions and 8 deletions
|
@ -32,6 +32,7 @@ def build_parameters(body, chat=False):
|
|||
'tfs': float(body.get('tfs', 1)),
|
||||
'top_a': float(body.get('top_a', 0)),
|
||||
'repetition_penalty': float(body.get('repetition_penalty', body.get('rep_pen', 1.1))),
|
||||
'additive_repetition_penalty': float(body.get('additive_repetition_penalty', body.get('additive_rep_pen', 0))),
|
||||
'repetition_penalty_range': int(body.get('repetition_penalty_range', 0)),
|
||||
'encoder_repetition_penalty': float(body.get('encoder_repetition_penalty', 1.0)),
|
||||
'top_k': int(body.get('top_k', 0)),
|
||||
|
|
|
@ -10,6 +10,7 @@ default_req_params = {
|
|||
'top_p': 1.0,
|
||||
'top_k': 1, # choose 20 for chat in absence of another default
|
||||
'repetition_penalty': 1.18,
|
||||
'additive_repetition_penalty': 0,
|
||||
'repetition_penalty_range': 0,
|
||||
'encoder_repetition_penalty': 1.0,
|
||||
'suffix': None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue