XLM-ROBERTA
# 🐛 Bug

## Information

Model I am using (Bert, XLNet ...):  XLM-ROBERTA

In order to fine-tune XLM-ROBERTA from pre_trained file, since the config file does not have the model_type field, all the required files should be in a folder which contains "xlm-robert" in its name! otherwise the "XLM" config will be assigned !


That's a good point @nooralahzadeh! We should probably add the `model_type` field to the XLM-ROBERTA config. 

@julien-c - If it's fine for you I can add the `model_type` `xlm-roberta` to all `xlm-roberta` configs of the following models: 
https://huggingface.co/models?search=xlm-rob 

As @nooralahzadeh pointed out, the fine-tuned XLM-ROBERTA models would otherwise default to the XLM model (because of its name and the implemented Fallback pattern in https://github.com/huggingface/transformers/blob/f6a23d19116a62bd3c662d0aa381130b49abcff7/src/transformers/configuration_auto.py#L190) 

Should be easy with a S3 AWS script. <|||||>Hmm, there is a `xlm-roberta` before `xlm` and `roberta` in [CONFIG_MAPPING](https://github.com/huggingface/transformers/blob/f6a23d19116a62bd3c662d0aa381130b49abcff7/src/transformers/configuration_auto.py#L65) so it should be correctly picked up, no?<|||||>True, @nooralahzadeh I guess in order to avoid falling to 'xlm' you have to name your files/folders 'xlm-roberta-something' (so you need to include the full xlm-roberta name) or you can just manually change the config of your xlm-roberta and add the `model_type`<|||||>Thanks, this is what I said in the first comment: need to have "xlm-roberta" in its name!<|||||>Hello thanks,   this command not work! can you help me? please
python  run_squad.py \
--model_type xlm-roberta

<|||||>Hey @Forutanrad,

could you please open a new issue for this?<|||||>Hello, yes thanks.

On Thu, 3 Feb 2022, 13:28 Patrick von Platen, ***@***.***>
wrote:

> Hey @Forutanrad <https://github.com/Forutanrad>,
>
> could you please open a new issue for this?
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/transformers/issues/3498#issuecomment-1028806963>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ASUDOKXALOAGOJF5NSHE4MDUZJGSRANCNFSM4LVTH64A>
> .
> Triage notifications on the go with GitHub Mobile for iOS
> <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
> or Android
> <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
>
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
