Bug in the Flaubert tokenizer_config.json do_lowercase option
Hi,This is a bug report for the Flaubert tokenizer.Thetokenizer_config.jsonof all models of the Flaubert model repo, for example:herehas the wrong option name:{
  "do_lower_case": true
}while it should readdo_lowercase, as expected by theFlaubertTokenizer. This results in all Flaubert models having case-sensitive tokenizers.In my project (flaubert-base-uncasedmodel) the bug first manifested itself in transformers v.4.4.0. Previous versions of transformers didn’t download this file, and I noticed it during the version upgrade. It may be related to Pull Request#10624, but I’m not at all sure here and it probably doesn’t really matter.Thanks for correcting the bug and many thanks for the great library.Environment infotransformersversion: 4.4.0Platform: Linux-5.4.0-80-generic-x86_64-with-glibc2.10Python version: 3.8.8PyTorch version (GPU?): 1.9.0a0+df837d0 (True)Tensorflow version (GPU?): not installed (NA)Using GPU in script?: YesUsing distributed or parallel set-up in script?: NoWho can help@thomwolf@patrickvonplaten
2021-09-28T18:33:27Z
Hi, there hasn’t been any answer to my report, maybe, I have posted it to the wrong place or haven’t tagged the correct person? Could someone please help me get the message through?Also, in case this helps, here are some steps, that someone can take to reproduce the incorrect model behaviour:Download the default ‘flaubert-base-uncased’ model from the official repo, fix the seed, start the training and print out something (train loss, some weights, ets).Then in the same downloaded model, modify the"do_lower_case": falseand restart the training. Make sure that the printed value is exactly the same.Then still in the same downloaded model, modify the option to"do_lowercase": false, restart the training and once again make sure that the printed value is the same.Basically, those three trainings are the same because in the first two cases the network uses the default value of"do_lowercase": false, while in the third one we explicitly select the option.Finally, in the very same model, set"do_lowercase": true, launch the training and check that now the training is different, and that this is indeed the correct option name, which controls the upper/lower case of the model.