Add prompt_lookup_num_tokens parameter (#5296)

This commit is contained in:
oobabooga 2024-01-17 17:09:36 -03:00 committed by GitHub
parent 952a05a7c8
commit e055967974
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 9 additions and 0 deletions

View file

@ -291,6 +291,9 @@ def generate_reply_HF(question, original_question, seed, state, stopping_strings
if state['negative_prompt'] != '':
generate_params['negative_prompt_ids'] = encode(state['negative_prompt'])
if state['prompt_lookup_num_tokens'] > 0:
generate_params['prompt_lookup_num_tokens'] = state['prompt_lookup_num_tokens']
for k in ['epsilon_cutoff', 'eta_cutoff']:
if state[k] > 0:
generate_params[k] = state[k] * 1e-4