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

Use built in function to access special tokens and ids #16

Open
MarkusSagen opened this issue Mar 13, 2022 · 0 comments
Open

Use built in function to access special tokens and ids #16

MarkusSagen opened this issue Mar 13, 2022 · 0 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request feature request New feature or functionality wanted

Comments

@MarkusSagen
Copy link
Collaborator

Current implementation for mapping the tokens to their ids caused some problems when there were new words containing "token" in them. Currently, we map from the vocab file all tokens containing the word token. However, for (at lease non-SentencePiece) tokenizers in Huggignface transformers, there are already two argmuments for this:

  • tokenizer.all_special_tokens
  • tokenizer.all_special_ids

Let's test and replace our implementation with the officially supported vocab arguments

def map_special_tokens_to_ids(

@MarkusSagen MarkusSagen self-assigned this Mar 13, 2022
@MarkusSagen MarkusSagen added bug Something isn't working enhancement New feature or request feature request New feature or functionality wanted labels Mar 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request feature request New feature or functionality wanted
Projects
None yet
Development

No branches or pull requests

1 participant