Tensorflow Model Variant

#13
by willieseun - opened

This discussion was created to request the conversion of the model from PyTorch .bin to Tensorflow .h5.

I would like to convert to TensorFlow format for further analysis and use in a TensorFlow-based application. I understand that converting a PyTorch model to TensorFlow format can be a challenging task, and it requires a thorough understanding of both frameworks. However, I believe that this conversion would be beneficial in terms of using the PyTorch model in a TensorFlow-based application and to the TensorFlow community.
Therefore, I kindly request your support in converting the PyTorch model into TensorFlow format. I would greatly appreciate your expertise in this matter and any guidance you can provide.
Thank you for your time and consideration. I look forward to hearing from you soon.
Sincerely,
William.

I have been able to figure it out. For anyone, you just need to add from_pt=True when loading the PyTorch model into Tensorflow as seen below:
gptj_model = TFGPTJModel.from_pretrained(gpt_MODEL_path, config=cfg, from_pt=True)

willieseun changed discussion status to closed

Sign up or log in to comment