Loading pretrained RobertaModel,size missmatch error
My code is as follows:

`config = RobertaConfig.from_pretrained("roberta-base", max_position_embeddings=2048)`
`model = RobertaModel.from_pretrained('roberta-base',config = config)`
then I get the following error:
`size mismatch for roberta.embeddings.position_embeddings.weight: copying a param with shape torch.Size([514, 768]) from checkpoint, the shape in current model is torch.Size([2048, 768]).`

how can I solve this problem? If I want to expand the length of input sentences, what should I do?


@aixiaobaikyh Please follow the issue template and fill out all the requesting information such as the transformers version being run. 

If running on a version of transformers released in the past year, the error message shared here is not the full error message that is printed out. The final part instructs on how to resolve: 
```
        You may consider adding `ignore_mismatched_sizes=True` in the model `from_pretrained` method.
```