from transformers import GPT2Config, GPT2LMHeadModel ''' This is a script to convert the Jax model to Pytorch model ''' model = GPT2LMHeadModel.from_pretrained(".", from_flax=True) model.save_pretrained(".")