Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add more special tokens #71

Merged
merged 7 commits into from
Dec 28, 2023
Merged

feat: Add more special tokens #71

merged 7 commits into from
Dec 28, 2023

Conversation

tomeras91
Copy link
Contributor

@tomeras91 tomeras91 commented Dec 28, 2023

feat: Add eos_id and newline_id

@tomeras91 tomeras91 requested a review from a team as a code owner December 28, 2023 10:10
@tomeras91 tomeras91 changed the title Add more special tokens feat: Add more special tokens Dec 28, 2023

self._newline_piece = config.get("newline_piece")
self.newline_id = self.convert_tokens_to_ids(self._newline_piece)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tomeras91 I see that on line 48 we already have a newline_id whats the difference?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. I missed it. I'll just make it "public"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great. Also notice that another function encode is using it, so make sure you rename it in all places

@tomeras91 tomeras91 merged commit 9a9e1a8 into main Dec 28, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants