hub-docs
hub-docs copied to clipboard
Ability to modify "Use this model with transformers"
Is your feature request related to a problem? Please describe.
On the hub website, when you click "Use this model with transformers" it generates a sample code based on the classname of the model (see picture below)
Describe the solution you'd like It would be good to be able to modify this based on the model card, or some file that you upload to the platform
Describe alternatives you've considered We have a description that works as part of model cards
Additional context Add any other context or screenshots about the feature request here.
Hey there! This is actually retrieved from the config.json file in the repository (which in your case specifies BertMesh).
What would you like this to look like?
Ohh, I didn't know that. Thanks for the (very quick!) answer. I think in our case it only works if it's AutoModel, otherwise the class doesn't exist
I see! The solution might be a bit hacky, but you can change the architectures to AutoModel and it should give you what you want, although trust_remote_code=True would still be missing.
@julien-c WDYT of a mechanism to override the inference snippet?