From 056a24977aaaa93febc32ceea90dc7d8c17e6e1a Mon Sep 17 00:00:00 2001 From: randaller Date: Mon, 20 Mar 2023 19:35:10 +0300 Subject: [PATCH] Update hf-chat-example.py --- hf-chat-example.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hf-chat-example.py b/hf-chat-example.py index e2c91a5..ae9dab3 100644 --- a/hf-chat-example.py +++ b/hf-chat-example.py @@ -24,6 +24,8 @@ class StoppingCriteriaSub(StoppingCriteria): super().__init__() def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTensor, stops=[]): + print('-' * 40) + print(tokenizer.decode(input_ids[0])) if input_ids[0][-1] == 13: return True