Add mirostat parameters for llama.cpp (#2287)
This commit is contained in:
parent
ec7437f00a
commit
c0fd7f3257
13 changed files with 80 additions and 15 deletions
|
@ -26,6 +26,9 @@ def build_parameters(body, chat=False):
|
|||
'penalty_alpha': float(body.get('penalty_alpha', 0)),
|
||||
'length_penalty': float(body.get('length_penalty', 1)),
|
||||
'early_stopping': bool(body.get('early_stopping', False)),
|
||||
'mirostat_mode': int(body.get('mirostat_mode', 0)),
|
||||
'mirostat_tau': float(body.get('mirostat_tau', 5)),
|
||||
'mirostat_eta': float(body.get('mirostat_eta', 0.1)),
|
||||
'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))),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue