From 5095e7f94882bf9b18e72fef9dfc4032a6b019c7 Mon Sep 17 00:00:00 2001 From: Leandro von Werra Date: Wed, 20 Mar 2024 10:30:27 +0100 Subject: [PATCH] add eos token to generate (#1459) --- examples/scripts/chat.py | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/scripts/chat.py b/examples/scripts/chat.py index ef969a9dd7..499bfa42da 100644 --- a/examples/scripts/chat.py +++ b/examples/scripts/chat.py @@ -323,6 +323,7 @@ def chat_cli(): top_p=current_args.top_p, repetition_penalty=current_args.repetition_penalty, pad_token_id=tokenizer.pad_token_id, + eos_token_id=tokenizer.eos_token_id, ) thread = Thread(target=model.generate, kwargs=generation_kwargs)