英文:
How push HF model to the hub
问题
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
我期望能够推送模型,而不仅仅是令牌化器和处理器,如下:
链接
英文:
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
得分: 1
你可以按照这个指南操作 链接
pt_model = DistilBertForSequenceClassification.from_pretrained("路径/到/你选择的厉害名称", from_tf=True)
pt_model.save_pretrained("路径/到/你选择的厉害名称")
pt_model.push_to_hub("my-awesome-org/my-awesome-model")
你可以直接在你的模型上调用push_to_hub来上传它到Hub。
在push_to_hub中指定你的模型名称:
pt_model.push_to_hub("my-awesome-model")
push_to_hub函数还可用于将其他文件添加到模型存储库中。例如,将一个分词器添加到模型存储库:
tokenizer.push_to_hub("my-awesome-model")
英文:
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")
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论