revert incorrect eos_token_id change from #814 (#1261)

- fixes #1054
This commit is contained in:
kernyan 2023-04-16 00:47:01 -04:00 committed by GitHub
parent a2127239de
commit ac19d5101f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -209,7 +209,7 @@ def generate_reply(question, state, eos_token=None, stopping_strings=[]):
else: else:
for k in ['max_new_tokens', 'do_sample', 'temperature']: for k in ['max_new_tokens', 'do_sample', 'temperature']:
generate_params[k] = state[k] generate_params[k] = state[k]
generate_params['stop'] = state['eos_token_ids'][-1] generate_params['stop'] = eos_token_ids[-1]
if not shared.args.no_stream: if not shared.args.no_stream:
generate_params['max_new_tokens'] = 8 generate_params['max_new_tokens'] = 8