Add tfs and top_a to the API examples

This commit is contained in:
oobabooga 2023-05-31 23:44:38 -03:00
parent b6c407f51d
commit 486ddd62df
5 changed files with 10 additions and 2 deletions

View File

@ -39,6 +39,8 @@ async def run(user_input, history):
'typical_p': 1,
'epsilon_cutoff': 0, # In units of 1e-4
'eta_cutoff': 0, # In units of 1e-4
'tfs': 1,
'top_a': 0,
'repetition_penalty': 1.18,
'top_k': 40,
'min_length': 0,

View File

@ -33,6 +33,8 @@ def run(user_input, history):
'typical_p': 1,
'epsilon_cutoff': 0, # In units of 1e-4
'eta_cutoff': 0, # In units of 1e-4
'tfs': 1,
'top_a': 0,
'repetition_penalty': 1.18,
'top_k': 40,
'min_length': 0,

View File

@ -26,6 +26,8 @@ async def run(context):
'typical_p': 1,
'epsilon_cutoff': 0, # In units of 1e-4
'eta_cutoff': 0, # In units of 1e-4
'tfs': 1,
'top_a': 0,
'repetition_penalty': 1.18,
'top_k': 40,
'min_length': 0,

View File

@ -18,6 +18,8 @@ def run(prompt):
'typical_p': 1,
'epsilon_cutoff': 0, # In units of 1e-4
'eta_cutoff': 0, # In units of 1e-4
'tfs': 1,
'top_a': 0,
'repetition_penalty': 1.18,
'top_k': 40,
'min_length': 0,

View File

@ -89,6 +89,8 @@ def load_preset_values(preset_menu, state, return_dict=False):
'typical_p': 1,
'epsilon_cutoff': 0,
'eta_cutoff': 0,
'tfs': 1,
'top_a': 0,
'repetition_penalty': 1,
'encoder_repetition_penalty': 1,
'top_k': 0,
@ -101,8 +103,6 @@ def load_preset_values(preset_menu, state, return_dict=False):
'mirostat_mode': 0,
'mirostat_tau': 5.0,
'mirostat_eta': 0.1,
'tfs': 1,
'top_a': 0,
}
with open(Path(f'presets/{preset_menu}.yaml'), 'r') as infile: