File size: 256 Bytes
62e7724
 
 
 
 
1
2
3
4
5
6
# This script overwrites any existing PyTorch model. Generates a new one with an LM head from the pretrained Flax model.
from transformers import RobertaForMaskedLM
model = RobertaForMaskedLM.from_pretrained(".",from_flax=True)
model.save_pretrained(".")