How to write config file to build custom ViT via HuggingFace Hub #2035
-
I'm re-hosting AudioMAE weights on HF hub so that I can load AudioMAE model easily from timm: https://huggingface.co/gaunernst/vit_base_patch16_1024_128.audiomae_as2m_ft_as20k The ideal outcome is to be able to load the model like any other timm models: model = timm.create_model("hf_hub:gaunernst/vit_base_patch16_1024_128.audiomae_as2m_ft_as20k", pretrained=True) However, I'm facing some problems writing the
After mimicking your other ViT config files and trying to change the config, I figured that setting
Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
@gau-nernst correct re the input_size, that is adjustable in that fashion, the global pool and other args passed through the model are not right now.... BUT, it's a completely valid use case and I would like to support this. I think I could make a |
Beta Was this translation helpful? Give feedback.
-
@gau-nernst testing this right now, fairly easy addition, yay this is what it will look like in the config file https://huggingface.co/rwightman/test_vit_b16/blob/main/config.json |
Beta Was this translation helpful? Give feedback.
-
@gau-nernst it's on the main branch now, any interest in giving it a try before I put out a new release? Intended to be used like this...
|
Beta Was this translation helpful? Give feedback.
@gau-nernst it's on the main branch now, any interest in giving it a try before I put out a new release?
Intended to be used like this...