tokenizer.save_pretrained() doest not save an important part of tokenizer_config of FlaubertTokenizer
Author: vmaryasin
Pull request: no

## Environment info

- `transformers` version: 4.10.3
- 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)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: No
- Using distributed or parallel set-up in script?: No

### Who can help

@LysandreJik @thomwolf

## Information

**model**:

Flaubert with `flaubert/flaubert_base_uncased` tokenizer

When loading the tokenizer, that has been saved with `save_pretrained()`, the behaviour of the tokenizer changes. 

In fact, an important `"do_lowercase": true` config property of the Flaubert tokenizer (see [config file](https://huggingface.co/flaubert/flaubert_base_uncased/blob/main/tokenizer_config.json)) does not get saved to the newly created `tokenizer_config.json` file, so once the tokenizer is loaded, it becomes cased (default behaviour).

## To reproduce

Steps to reproduce the behavior:

```
from transformers import FlaubertTokenizer

save_directory = <some_directory>
tokenizer = FlaubertTokenizer.from_pretrained('flaubert/flaubert_base_uncased')
tokenizer.save_pretrained(save_directory)
tokenizer_reloaded = FlaubertTokenizer.from_pretrained(save_directory)

print(tokenizer.tokenize("Je m'appelle FlauBERT"))
print(tokenizer_reloaded.tokenize("Je m'appelle FlauBERT"))

print(f"do_lowercase: {tokenizer.do_lowercase}")
print(f"do_lowercase: {tokenizer_reloaded.do_lowercase}")
```

1. Check that 2 pairs of print messages differ
2. Check that `do_lowercase` is missing in the `<save_directory>/tokenizer_config.json` file


## Expected behavior

Loading the saved tokenizer should not change its behaviour.

I believe this happens because the initializer of `FlaubertTokenizer` does not pass the `do_lowercase` option to its parent class' initializer, so it does not populate the `self.init_inputs`, which constitutes the base of the future saved `tokenizer_config.json` file.

```
class FlaubertTokenizer(XLMTokenizer):

...

    def __init__(self, do_lowercase=False, **kwargs):
        super().__init__(**kwargs)
```

```
class PreTrainedTokenizerBase(SpecialTokensMixin, PushToHubMixin):

...

    def __init__(self, **kwargs):
        # inputs and kwargs for saving and re-loading (see ``from_pretrained`` and ``save_pretrained``)
        self.init_inputs = ()
        **self.init_kwargs = copy.deepcopy(kwargs)**
```

But I may be totally wrong here as I certainly don't have the full picture. Also this problem of not saving some important configs may be relevant to other models too. So I'm not sure that just fixing to `super().__init__(do_lowercase=do_lowercase, **kwargs)` is the best solution.


Comments:
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.

Up

It is very possible that this is the case cc @SaulLu 

Would you like to open a PR with a proposed fix?

Thank you for the reply. I will do that, yes. 

Do you think that this may concern other models too? 
Also, is there a place (doc/comment/etc), which states that in order to be saved, a config should be passed as a keyword argument to its base class? I don't remember seeing it anywhere, neither was it directly obvious. So I had to go down to `PreTrainedTokenizerBase` to understand what's going on. 

I feel like at least some comment should be left somewhere for future developers, but I cannot come up with a good place for it.  Maybe this existing line is already enough?

```
class XLMTokenizer(PreTrainedTokenizer):
    """
...
    This tokenizer inherits from [`PreTrainedTokenizer`] which contains most of the main methods.
    Users should refer to this superclass for more information regarding those methods.
```

Thanks a lot for your fix @vmaryasin that you proposed in [this PR](https://github.com/huggingface/transformers/pull/14991). I think this closes the issue!