How push HF model to the hub

654 Views Asked by At

I have a related issue can any one solve it? Problem described well here

I am expacting to pushing the model not only tokenizer and processor as : link

1

There are 1 best solutions below

0
Phoenix On

you can follow this instruction Link

pt_model = DistilBertForSequenceClassification.from_pretrained("path/to/awesome-name-you-picked", from_tf=True)
pt_model.save_pretrained("path/to/awesome-name-you-picked")
pt_model.push_to_hub("my-awesome-org/my-awesome-model")

you can call push_to_hub directly on your model to upload it to the Hub. Specify your model name in push_to_hub:

pt_model.push_to_hub("my-awesome-model")

The push_to_hub function can also be used to add other files to a model repository. For example, add a tokenizer to a model repository:

tokenizer.push_to_hub("my-awesome-model")