v4.22.1 ErnieForMaskedLM Bug
### System Info

![Xnip2022-09-17_22-50-00](https://user-images.githubusercontent.com/50035364/190864836-f71c7f8c-8acf-45b0-90d2-e1d5ac8556e2.jpg)


@LysandreJik

### Who can help?

_No response_

### Information

- [ ] The official example scripts
- [ ] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

from transformers import ErnieForMaskedLM

### Expected behavior

Failed to import transformers.models.ernie
Hi @wzjj98, could you please share a bit more information about your PC setup and the script you're calling?

I can confirm it shouldn't be a problem to import `ErnieForMaskedLM` with `transformers==4.22.1`<|||||>My GPU NVIDIA GeForce GTX 3090
Processor:Intel(R) Xeon(R) Platinum 8255C CPU @ 2.50GHz
<|||||>![Xnip2022-09-18_14-58-11](https://user-images.githubusercontent.com/50035364/190889830-83662ecc-0861-4b7f-8cda-6bbaa94f531d.jpg)
![Xnip2022-09-18_14-59-01](https://user-images.githubusercontent.com/50035364/190889832-ffcb86f0-d941-41d1-ad1f-a9982769c4f3.jpg)
![Xnip2022-09-18_14-59-12](https://user-images.githubusercontent.com/50035364/190889835-4ac3e831-c96b-4488-b60d-566f09c01083.jpg)

<|||||>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/main/CONTRIBUTING.md) are likely to be ignored.