-
Notifications
You must be signed in to change notification settings - Fork 816
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
add option to skip special tokens #1419
Conversation
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
This works as expected for now: >>> from transformers import AutoTokenizer
>>> tokenizer = AutoTokenizer.from_pretrained("gp2")
>>> tokenizer.tokenize("<|endoftext|>")
['<|endoftext|>']
>>> tokenizer._tokenizer.encode_special_tokens = True
>>> tokenizer.tokenize("<|endoftext|>")
['<', '|', 'end', 'of', 'text', '|', '>'] the goal is to support passing this as a kwargs, similarly to the slow! |
TODO :
|
…zers into encode-special-tokens
Before merging I just want to add a getter, and make sure we can just set it with |
PR is not on the correct branch lol |
Allow skipping special tokens when encoding
fixes #1347, fixes #1391 fixes #1368