I-BERT tokenizer not loading; example code not working.
Author: carolmanderson
Pull request: no

Following the example [here](https://huggingface.co/transformers/model_doc/ibert.html), I'm trying to load the 'kssteven/ibert-roberta-base' tokenizer: 

```
from transformers import RobertaTokenizer
tokenizer = RobertaTokenizer.from_pretrained('kssteven/ibert-roberta-base')
```

It errors out as follows:

```
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/carola/opt/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 1710, in from_pretrained
    resolved_vocab_files, pretrained_model_name_or_path, init_configuration, *init_inputs, **kwargs
  File "/Users/carola/opt/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 1781, in _from_pretrained
    tokenizer = cls(*init_inputs, **init_kwargs)
  File "/Users/carola/opt/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/roberta/tokenization_roberta.py", line 171, in __init__
    **kwargs,
  File "/Users/carola/opt/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/gpt2/tokenization_gpt2.py", line 179, in __init__
    with open(vocab_file, encoding="utf-8") as vocab_handle:
TypeError: expected str, bytes or os.PathLike object, not NoneType
```

Using transformers version 4.5.1 on Mac or Ubuntu

Comments:
Hi @carolmanderson ,

Some tokenizer files were missing from the model repo. I've uploaded them, it should now work.

Hi,

I want to test IBERT's speedup, and I have done exactly what is said in https://huggingface.co/kssteven/ibert-roberta-base. For the quantization part, when I set quant_mode to true and run the evaluation again, I get a much slower model. What am I doing wrong?

Thank you for your reply!

Would be nice if you open a new issue for this. Thanks.

Thanks @patil-suraj , it is working for me now. 

I'm facing the same issue in 4.9

`--> 173         self.transformer_tokenizer = RobertaTokenizerFast.from_pretrained(transformer, **tokenizer_parameters)
    174         self.transformer_config = AutoConfig.from_pretrained(transformer)
    175         self.network = NERDANetwork(self.transformer_model, self.device, len(tag_complete), dropout = dropout)

/usr/local/lib/python3.7/dist-packages/transformers/tokenization_utils_base.py in from_pretrained(cls, pretrained_model_name_or_path, *init_inputs, **kwargs)
   1731 
   1732         return cls._from_pretrained(
-> 1733             resolved_vocab_files, pretrained_model_name_or_path, init_configuration, *init_inputs, **kwargs
   1734         )
   1735 

/usr/local/lib/python3.7/dist-packages/transformers/tokenization_utils_base.py in _from_pretrained(cls, resolved_vocab_files, pretrained_model_name_or_path, init_configuration, *init_inputs, **kwargs)
   1848         # Instantiate tokenizer.
   1849         try:
-> 1850             tokenizer = cls(*init_inputs, **init_kwargs)
   1851         except OSError:
   1852             raise OSError(

/usr/local/lib/python3.7/dist-packages/transformers/models/roberta/tokenization_roberta_fast.py in __init__(self, vocab_file, merges_file, tokenizer_file, errors, bos_token, eos_token, sep_token, cls_token, unk_token, pad_token, mask_token, add_prefix_space, **kwargs)
    171             mask_token=mask_token,
    172             add_prefix_space=add_prefix_space,
--> 173             **kwargs,
    174         )
    175 

/usr/local/lib/python3.7/dist-packages/transformers/models/gpt2/tokenization_gpt2_fast.py in __init__(self, vocab_file, merges_file, tokenizer_file, unk_token, bos_token, eos_token, add_prefix_space, **kwargs)
    143             eos_token=eos_token,
    144             add_prefix_space=add_prefix_space,
--> 145             **kwargs,
    146         )
    147 

/usr/local/lib/python3.7/dist-packages/transformers/tokenization_utils_fast.py in __init__(self, *args, **kwargs)
    105         elif fast_tokenizer_file is not None and not from_slow:
    106             # We have a serialization from tokenizers which let us directly build the backend
--> 107             fast_tokenizer = TokenizerFast.from_file(fast_tokenizer_file)
    108         elif slow_tokenizer is not None:
    109             # We need to convert a slow tokenizer to build the backend

Exception: No such file or directory (os error 2)`


Same problem. 
When I tried to debug this, I found this code load a config file [tokenizer_config](https://huggingface.co/kssteven/ibert-roberta-base/resolve/main/tokenizer_config.json) and  try to load this file:
![2021-08-25T20:05:36](https://cdn.jsdelivr.net/gh/xiangsanliu/images@master/uPic/2021-08-25T20:05:36.png)
My transformers version: 4.10.0.dev0. 

> I'm facing the same issue in 4.9
> 
> `--> 173 self.transformer_tokenizer = RobertaTokenizerFast.from_pretrained(transformer, **tokenizer_parameters)
> 174 self.transformer_config = AutoConfig.from_pretrained(transformer)
> 175 self.network = NERDANetwork(self.transformer_model, self.device, len(tag_complete), dropout = dropout)
> 
> /usr/local/lib/python3.7/dist-packages/transformers/tokenization_utils_base.py in from_pretrained(cls, pretrained_model_name_or_path, *init_inputs, **kwargs)
> 1731
> 1732 return cls._from_pretrained(
> -> 1733 resolved_vocab_files, pretrained_model_name_or_path, init_configuration, *init_inputs, **kwargs
> 1734 )
> 1735
> 
> /usr/local/lib/python3.7/dist-packages/transformers/tokenization_utils_base.py in _from_pretrained(cls, resolved_vocab_files, pretrained_model_name_or_path, init_configuration, *init_inputs, **kwargs)
> 1848 # Instantiate tokenizer.
> 1849 try:
> -> 1850 tokenizer = cls(*init_inputs, **init_kwargs)
> 1851 except OSError:
> 1852 raise OSError(
> 
> /usr/local/lib/python3.7/dist-packages/transformers/models/roberta/tokenization_roberta_fast.py in **init**(self, vocab_file, merges_file, tokenizer_file, errors, bos_token, eos_token, sep_token, cls_token, unk_token, pad_token, mask_token, add_prefix_space, **kwargs)
> 171 mask_token=mask_token,
> 172 add_prefix_space=add_prefix_space,
> --> 173 **kwargs,
> 174 )
> 175
> 
> /usr/local/lib/python3.7/dist-packages/transformers/models/gpt2/tokenization_gpt2_fast.py in **init**(self, vocab_file, merges_file, tokenizer_file, unk_token, bos_token, eos_token, add_prefix_space, **kwargs)
> 143 eos_token=eos_token,
> 144 add_prefix_space=add_prefix_space,
> --> 145 **kwargs,
> 146 )
> 147
> 
> /usr/local/lib/python3.7/dist-packages/transformers/tokenization_utils_fast.py in **init**(self, *args, **kwargs)
> 105 elif fast_tokenizer_file is not None and not from_slow:
> 106 # We have a serialization from tokenizers which let us directly build the backend
> --> 107 fast_tokenizer = TokenizerFast.from_file(fast_tokenizer_file)
> 108 elif slow_tokenizer is not None:
> 109 # We need to convert a slow tokenizer to build the backend
> 
> Exception: No such file or directory (os error 2)`

Hi, have you solved this problem?

@xiangsanliu this should be fixed now, the hardcoded `tokenizers_file` path  is now removed (cf hub commit https://huggingface.co/kssteven/ibert-roberta-base/commit/0857df571974cf0633da7536addb8b9da230293b)

you could pass `force_download=True` to `.from_pretrained` to get the update config file.