This commit is contained in:
hiyouga
2023-08-08 17:55:55 +08:00
parent a9980617f5
commit 4b841a6b35
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