Updates incorrect tokenizer configuration file

#2
by lysandre HF staff - opened

This repository contains in an incorrect tokenizer configuration file, and is instead relying on some attributes set within
the transformers library directly in order to correctly tokenize inputs.

In order to ensure repositories don't depend on internal configuration changes, we're removing these attribute maps
in transformers#29112.

In doing so, we see that the following attributes are currently missing from the configuration and would be
ill-configured without this PR:

{'do_lower_case': True, 'do_basic_tokenize': True, 'never_split': None, 'unk_token': '[UNK]', 'sep_token': '[SEP]', 'pad_token': '[PAD]', 'cls_token': '[CLS]', 'mask_token': '[MASK]', 'tokenize_chinese_chars': True, 'strip_accents': None, 'special_tokens_map_file': None, 'tokenizer_file': None, 'name_or_path': 'junnyu/roformer_small_discriminator', 'tokenizer_class': 'ElectraTokenizer', 'model_max_length': 128}

This PR aims to add these attributes and their values to the tokenizer config file.
This will proceed to make this repository more robust by ensuring that:

  • the repository does not depend on intra-library code
  • clones of this repository continue working as expected even without the correct repository name
  • other libraries that would like to leverage this repository do not depend on code within the transformers library

Thanks πŸ€—

lysandre changed pull request status to open
Ready to merge
This branch is ready to get merged automatically.

Sign up or log in to comment