sundanese-gpt2-base / flax_to_torch.py
w11wo's picture
pytorch model
a932a01
raw
history blame
228 Bytes
from transformers import GPT2LMHeadModel, AutoTokenizer
model = GPT2LMHeadModel.from_pretrained("./", from_flax=True)
model.save_pretrained("./")
tokenizer = AutoTokenizer.from_pretrained("./")
tokenizer.save_pretrained("./")