Skip to content

Add Encode with Options for add_special_tokens=True use-case #1504

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sayanshaw24
Copy link
Contributor

@sayanshaw24 sayanshaw24 commented May 22, 2025

Adds back changes from this commit: d4bd10b#diff-24fa4bbae16e6754615bf6a87cc75472e56b45b39131886550ccb655801a247c

Note: Encode sets add_special_tokens by default to False as there was no use-case for setting it to True, but now we do. We add a separate primitive, i.e. EncodeWithOptions rather than adding the additional param directly to Encode for backward compatibility.

@sayanshaw24 sayanshaw24 requested a review from apsonawane May 22, 2025 21:28
@sayanshaw24 sayanshaw24 marked this pull request as ready for review May 27, 2025 19:15
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.

1 participant