mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-26 01:30:20 +01:00
Minor change
This commit is contained in:
parent
b3cba0b330
commit
6c7f187586
@ -141,7 +141,7 @@ def generate_reply(question, tokens, inference_settings, selected_model, eos_tok
|
|||||||
|
|
||||||
input_ids = encode(question, 1)
|
input_ids = encode(question, 1)
|
||||||
preset = preset.replace('max_new_tokens=tokens', 'max_new_tokens=1')
|
preset = preset.replace('max_new_tokens=tokens', 'max_new_tokens=1')
|
||||||
cuda = ".cuda()" if not args.cpu else ""
|
cuda = "" if args.cpu else ".cuda()"
|
||||||
for i in range(tokens):
|
for i in range(tokens):
|
||||||
if eos_token is None:
|
if eos_token is None:
|
||||||
output = eval(f"model.generate(input_ids, {preset}){cuda}")
|
output = eval(f"model.generate(input_ids, {preset}){cuda}")
|
||||||
|
Loading…
Reference in New Issue
Block a user