from transformers import XLMRobertaForMaskedLM model = XLMRobertaForMaskedLM.from_pretrained(".",from_flax=True) model.save_pretrained(".")