From d88b7836c64e138eb32d0e5797247358b6fe8ae1 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Mon, 6 Mar 2023 14:58:30 -0300 Subject: [PATCH] Fix bug in multigpu setups --- modules/text_generation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/text_generation.py b/modules/text_generation.py index e1ee5294..caa77df9 100644 --- a/modules/text_generation.py +++ b/modules/text_generation.py @@ -194,7 +194,7 @@ def generate_reply(question, max_new_tokens, do_sample, temperature, top_p, typi yield formatted_outputs(reply, shared.model_name) if not shared.args.flexgen: - if output[-1] == n: + if int(output[-1]) == int(n): break input_ids = torch.reshape(output, (1, output.shape[0])) else: