Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve discoverability on HF #109

Open
NielsRogge opened this issue Aug 4, 2024 · 0 comments
Open

Improve discoverability on HF #109

NielsRogge opened this issue Aug 4, 2024 · 0 comments

Comments

@NielsRogge
Copy link

NielsRogge commented Aug 4, 2024

Hi @Unrealluver and team,

Niels here from the open-source team at Hugging Face. Congrats on your work! I found it based on the paper page: https://huggingface.co/papers/2401.09417, which already has linked models.

However, I've got some suggestions regarding how to improve the integration with HF.

1. Make download stats work

Currently, download stats aren't tracked for your models. The easiest way to fix that is by leveraging the PyTorchModelHubMixin class, as it adds push_to_hub and from_pretrained capabilities to any custom nn.Module. It creates a config.json along with safetensors for each model, enforcing downloads to work.

Alternatively, a PR could be opened to the huggingface.js open-source library as explained here.

2. Make the model Transformers compatible

In case you want your models to be usable through the Transformers library with trust_remote_code=True, I highly recommend following this guide: https://huggingface.co/docs/transformers/custom_models. It basically allows people to use your backbones using the AutoModel and AutoModelForImageClassification APIs.

We recently did the same with the MambaVision author as can be seen here: https://huggingface.co/collections/nvidia/mambavision-66943871a6b36c9e78b327d3.

Let me know if you need any help regarding this!

Cheers,

Niels
ML Engineer @ HF 🤗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant