If you are porting a model from TensorFlow to PyTorch, a good starting point might be BERT's conversion script here
If you are porting a model from PyTorch to PyTorch, a good starting point might be BART's conversion script here