a BertForMaskedLM.from_pretrained error
## 🐛 Bug

<!-- Important information -->

Model I am using (BertForMaskedLM):

Language I am using the model on (Chinese):

When i want to do a limit vocabulary fine-tune in BerForMaskedLM, the new config/ vocab and model.bin in word_embedding are all been change. 

for example:

`config = BertConfig.from_pretrained('bert-base-chinese')`
`config.vocab_size = 2`
`model_dict = torch.load(old_model_path)`
`model_dict['bert.embeddings.word_embeddings.weight'] = model_dict['bert.embeddings.word_embeddings.weight'][:2]`
`torch.save(model_dict, new_model_path)`

`model = BertForMaskedLM.from_pretrained(new_model_path, config=config)`

But when i use the from_pretrained code for the model, an errors has appeared:

` Error(s) in loading state_dict for BertForMaskedLM:
	size mismatch for cls.predictions.bias: copying a param with shape torch.Size([21128]) from checkpoint, the shape in current model is torch.Size([2]).
	size mismatch for cls.predictions.decoder.weight: copying a param with shape torch.Size([21128, 768]) from checkpoint, the shape in current model is torch.Size([2, 768]).` 

And i have try to use the BertModel.from_pretrained, the error does not appear, and use the code to check the data shape.

`torch.load(new_model_path)['bert.embeddings.word_embeddings.weight'].shape `
it appear   torch.Size([2, 768])
Masked language modeling is an example of autoencoding language modeling , typically mask one or more of words in a sentence and have the model predict those masked words given the other words in sentence. When you changed the vocab size, the number of word to predic from the model also changed.
This unofficial methods leaved the output embedding and prediction bias unchanged while changed the vocab size, and caused these errors . 
I think the output embeddings should be copied from input embeddings, but the bias needs you to tune-up manually.

------ 
For now, these two lines may make you avoid the error
```
model_dict['cls.predictions.bias'] = model_dict['cls.predictions.bias'][:2]
model_dict['cls.predictions.decoder.weight'] = model_dict['cls.predictions.decoder.weight'][:2]


```<|||||>thank!