Former-commit-id: 8b912690e34b040b98c4eac5eef5c56876345b1d
This commit is contained in:
hiyouga 2023-11-01 23:07:58 +08:00
parent e3d64e119e
commit d57f70bf8a

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: