Allow API requests to use parameter presets

This commit is contained in:
oobabooga 2023-06-13 20:34:35 -03:00
parent 8936160e54
commit 474dc7355a
8 changed files with 96 additions and 58 deletions

View file

@ -20,8 +20,12 @@ async def run(context):
request = {
'prompt': context,
'max_new_tokens': 250,
# Generation params. If 'preset' is set to different than 'None', the values
# in presets/preset-name.yaml are used instead of the individual numbers.
'preset': 'None',
'do_sample': True,
'temperature': 1.3,
'temperature': 0.7,
'top_p': 0.1,
'typical_p': 1,
'epsilon_cutoff': 0, # In units of 1e-4
@ -39,6 +43,7 @@ async def run(context):
'mirostat_mode': 0,
'mirostat_tau': 5,
'mirostat_eta': 0.1,
'seed': -1,
'add_bos_token': True,
'truncation_length': 2048,