Skip to content

Commit

Permalink
Merge pull request FlagAI-Open#338 from Anhforth/master
Browse files Browse the repository at this point in the history
fixed issue 337
  • Loading branch information
ftgreat authored Jun 10, 2023
2 parents abe1a1d + c63fc84 commit b0f08a9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions flagai/data/tokenizer/uni_tokenizer/tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,13 +385,13 @@ def __init__(self,
self.token_start_id = self.TokenToId('<s>')
except KeyError:
self.token_start_id = self.TokenToId('[CLS]')

try:
self.token_end_id = self.TokenToId("</s>")
except KeyError:
self.token_end_id = self.TokenToId("<|endoftext|>")
except KeyError:
self.token_end_id = self.TokenToId("[SEP]")
try:
self.token_end_id = self.TokenToId("<|endoftext|>")
except KeyError:
self.token_end_id = self.TokenToId("[SEP]")

print("All special tokens: ", str([(k, v.token, v.Id) for k,v in self.command_name_map.items()]))

Expand Down

0 comments on commit b0f08a9

Please sign in to comment.