Add customizable ban tokens (#3899)
This commit is contained in:
parent
fb864dad7b
commit
f01b9aa71f
16 changed files with 56 additions and 5 deletions
|
@ -49,6 +49,7 @@ def build_parameters(body, chat=False):
|
|||
'seed': int(body.get('seed', -1)),
|
||||
'add_bos_token': bool(body.get('add_bos_token', True)),
|
||||
'truncation_length': int(body.get('truncation_length', body.get('max_context_length', 2048))),
|
||||
'custom_token_bans': str(body.get('custom_token_bans', '')),
|
||||
'ban_eos_token': bool(body.get('ban_eos_token', False)),
|
||||
'skip_special_tokens': bool(body.get('skip_special_tokens', True)),
|
||||
'custom_stopping_strings': '', # leave this blank
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue