Skip to content

Commit

Permalink
add additional roles
Browse files Browse the repository at this point in the history
  • Loading branch information
jquesnelle committed Sep 6, 2024
1 parent ecb5b37 commit d8f8025
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/nanotron/data/chat_tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ def _get_role(self, message: dict) -> Tuple[str, bool]:
role = message["from"]
if role == "gpt" or role == "assistant":
return "assistant", False
elif role == "summary" or role == "author":
return role, False
elif role == "human":
return "user", True
else:
Expand Down

0 comments on commit d8f8025

Please sign in to comment.