diff --git a/modules/text_generation.py b/modules/text_generation.py index 112285cd..f1b6a7e5 100644 --- a/modules/text_generation.py +++ b/modules/text_generation.py @@ -460,6 +460,7 @@ def generate_reply_HF(question, original_question, state, stopping_strings=None, output = output.to(device) starting_from = 0 if shared.is_seq2seq else len(input_ids[0]) + shared.model.last_completion_token_count = len(output) - starting_from yield get_reply_from_output_ids(output, state, starting_from=starting_from) # Stream the reply 1 token at a time.