Bug in the Flaubert tokenizer_config.json do_lowercase option
Author: vmaryasin
Pull request: no

## Environment info

- `transformers` version: 4.3.2
- Platform: Linux-5.4.0-88-generic-x86_64-with-glibc2.10
- Python version: 3.8.8
- PyTorch version (GPU?): 1.9.0a0+df837d0 (True)
- Using GPU in script?: Yes
- Using distributed or parallel set-up in script?: No

### Who can help
@LysandreJik @thomwolf @patrickvonplaten

## Information

Model I am using: FlauBERT

The problem arises when using:
* [ ] the official example scripts: (give details below)
* [ X ] my own modified scripts: (give details below)

The tasks I am working on is:
* [ ] an official GLUE/SQUaD task: (give the name)
* [ X ] my own task or dataset: (give details below)

## Report

Hi,
This is a bug report for the Flaubert tokenizer. (It has originally been posted [on the huggingface forum](https://discuss.huggingface.co/t/bug-in-the-flaubert-tokenizer-config-json-do-lowercase-option/10084), but I guess, it was a wrong place)
The `tokenizer_config.json` of all models of the Flaubert model repo, for example: [here](https://huggingface.co/flaubert/flaubert_base_uncased/blob/main/tokenizer_config.json) has the wrong option name:
```
{
  "do_lower_case": true
}
```
while it should read `do_lowercase`, as expected by the [FlaubertTokenizer.](https://huggingface.co/transformers/model_doc/flaubert.html?highlight=flauberttokenizer#transformers.FlaubertTokenizer) This results in all Flaubert models having case-sensitive tokenizers.

In my project (`flaubert-base-uncased` model) the bug first manifested itself in transformers v.4.4.0. Previous versions of transformers somehow didn’t download this file, and after the version upgrade, I noticed that my network behaves differently from before. 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.


## To reproduce

1. 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, etc).
2. Then in the same downloaded model, modify the `"do_lower_case": false` and restart the training. Make sure that the printed value is exactly the same.
3. 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.

4. 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.

## Expected behavior

The above tests would prove that the correct option, that controls the tokenizer is `do_lowercase`. 


Comments:
Hello, I can indeed reproduce. Thank you for opening an issue, I've updated the files on the hub. Let me know if your issue is fixed!

Hello,
Thank you very much for the quick fix!
Yes, the issue on my side is fixed, and I believe, everything should work correctly now. 

I would still suggest applying the same fix to the other 3 cased Flaubert models for consistency. And also removing the incorrect `do_lower_case` option entirely to avoid confusion. But I admit that this is your design choice as those two fixes won't change the behaviour directly.

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md) are likely to be ignored.