diff --git a/api-example-chat-stream.py b/api-example-chat-stream.py index 337e3136..7314563f 100644 --- a/api-example-chat-stream.py +++ b/api-example-chat-stream.py @@ -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, diff --git a/api-example-chat.py b/api-example-chat.py index 97f552e2..905fbca6 100644 --- a/api-example-chat.py +++ b/api-example-chat.py @@ -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, diff --git a/api-example-stream.py b/api-example-stream.py index 71eaa30c..43cde299 100644 --- a/api-example-stream.py +++ b/api-example-stream.py @@ -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, diff --git a/api-example.py b/api-example.py index 5cd0243a..4e4a7f66 100644 --- a/api-example.py +++ b/api-example.py @@ -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, diff --git a/server.py b/server.py index 8620000a..ea8348a9 100644 --- a/server.py +++ b/server.py @@ -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: