This commit is contained in:
hiyouga 2023-11-01 23:07:58 +08:00
parent 84af10cec9
commit 8b912690e3
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@ class ChatModel:
pad_token_id=self.tokenizer.pad_token_id
))
if int(num_return_sequences) > 1:
if isinstance(num_return_sequences, int) and num_return_sequences > 1:
generating_args["do_sample"] = True
if max_length: