From 6c7f1875867fabb70723dfdf76c30b06fca8e8a9 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Wed, 18 Jan 2023 21:59:23 -0300 Subject: [PATCH] Minor change --- server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.py b/server.py index e74a5c3..4991ba5 100644 --- a/server.py +++ b/server.py @@ -141,7 +141,7 @@ def generate_reply(question, tokens, inference_settings, selected_model, eos_tok input_ids = encode(question, 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): if eos_token is None: output = eval(f"model.generate(input_ids, {preset}){cuda}")