Loading RoBERTa pytorch_model.bin checkpoint in fairseq for evaluation
Hi,
I have fine-tuned a RoBERTa model using transformers and am facing issues when I'm loading that checkpoint in fairseq. The evaluation framework poses constraints so I have to load the model using fairseq.

```
self.model = RobertaModel.from_pretrained(
            roberta_model_dir, checkpoint_file=roberta_model_name
        )
```

I pass `checkpoint_file` as pytorch_model.bin

I get `KeyErrors` in fairseq` load_checkpoint_to_cpu function` (https://github.com/pytorch/fairseq/blob/main/fairseq/checkpoint_utils.py#L281). I have seen there exists a function for converting fairseq model to huggingface model but not able to find a fix for this. I even have models saved using `torch.save()` if that helps.

Would really appreciate help on this. Thanks.

Hi! We have a script to convert from `fairseq`'s checkpoints to `transformers`, but we don't have the script that would do it the other way around. You could try and adapt the script to do the conversion the other way, as it's essentially just renaming layers.<|||||>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.