Add mirostat parameters for llama.cpp (#2287)

This commit is contained in:
oobabooga 2023-05-22 19:37:24 -03:00 committed by GitHub
parent ec7437f00a
commit c0fd7f3257
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 80 additions and 15 deletions

View file

@ -294,6 +294,10 @@ def generate_reply_custom(question, original_question, seed, state, eos_token=No
for k in ['temperature', 'top_p', 'top_k', 'repetition_penalty']:
generate_params[k] = state[k]
if shared.model_type == 'llamacpp':
for k in ['mirostat_mode', 'mirostat_tau', 'mirostat_eta']:
generate_params[k] = state[k]
t0 = time.time()
reply = ''
try: