So I am using this to get the model
model = T5ForConditionalGeneration.from_pretrained(“t5-small”)
then I try to save the model using
model.save_pretrained(“/home/myname/Desktop/”, from_pt=True)
And I get the these files: config.json, pytorch_model.bin
next i try to load the model using
model = T5ForConditionalGeneration.from_pretrained(“config.json”)
and i get the error:
OSError: Unable to load weights from pytorch checkpoint file for ‘config.json’ at ‘config.json’. If you tried to load a PyTorch model from a TF 2.0 checkpoint, please set from_tf=True.
What am I doing wrong? Am i supposed to do something with the pytorch_model.bin file ?