Former-commit-id: c13ce66021b21e015871b84489eeafa127a424a4
This commit is contained in:
hiyouga
2023-08-08 17:55:55 +08:00
parent cda698a67f
commit a281cdeb89
3 changed files with 3 additions and 5 deletions

View File

@@ -75,7 +75,7 @@ class Template:
if tokenizer.eos_token_id and getattr(tokenizer, "add_eos_token", False):
eos_ids = [tokenizer.eos_token_id]
else: # use the first stop word as the eos token
eos_ids = tokenizer.convert_tokens_to_ids(self.stop_words[0])
eos_ids = [tokenizer.convert_tokens_to_ids(self.stop_words[0])]
return bos_ids, eos_ids