T5 weights auto conversion from TF to PyTorch

Hi Great community, I am wondering: is there a script that help automatically convert TF weights (*.h5) to PyTorch weights (.bin) and from PyTorch to TF for T5?

My goal is to use T5ForConditionalGeneration and TFT5ForConditionalGeneration interchangeably, i.e., I fine-tune a T5 model first in TF and then want to do inference with it in PyTorch.

Here you go my friend -:slight_smile:

1 Like