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

Add models/demo to Hugging Face Hub #1

Open
nateraw opened this issue Dec 9, 2022 · 4 comments
Open

Add models/demo to Hugging Face Hub #1

nateraw opened this issue Dec 9, 2022 · 4 comments

Comments

@nateraw
Copy link

nateraw commented Dec 9, 2022

Hey there, it would be really cool if the models/a demo were included in the facebook org on Hugging Face!

Also, it would be really cool to host a good demo of LaViLa on Spaces as well 😄 . I started a demo here... it's currently running on CPU, but if you're interested, we can move to facebook org and apply a GPU to the demo so more folks can try it out quickly.

Let me know if there's anything I can do to help 🤗

@rohitgirdhar
Copy link
Contributor

This is amazing, thanks so much @nateraw!! :)

@nateraw
Copy link
Author

nateraw commented Dec 12, 2022

My pleasure! The app currently has a GPU added to it for now for faster inference.

WDYT about sharing the models on the Hub? 😄 Anything I can do to help there?

@zhaoyue-zephyrus
Copy link
Contributor

Hey @nateraw ,

Thanks for your efforts for the 🤗Spaces Demo!! I researched a bit on the huggingface demo and it seems that I need to port the model to 🤗Transformers (https://huggingface.co/docs/transformers/add_new_model) IIRC (or if there is any alternative solution, let me know). I might have the bandwidth to work on this in the next couple of weeks. I will keep you posted!

Best,
Yue

@nateraw
Copy link
Author

nateraw commented Dec 13, 2022

Hey there, there's actually no need to port to Transformers if that's too much of a time commitment.

All you need to do is:

  1. Create a repo for a given model (best to use 1 repo per model ckpt). Can be done via browser or programatically with huggingface_hub.create_repo
  2. Upload the model checkpoint, which you can do via browser or programatically with huggingface_hub.upload_file or huggingface_hub.upload_folder
  3. create/upload a model card (which is just a README.md file in your repo).
  4. (Optional) Add some ability to load these models from the Hub in your codebase here so folks don't have to go download them manually...something like Model.from_pretrained('username/repo-id'). Under the hood you'd use huggingface_hub.hf_hub_download.

Happy to answer any other questions you may have :)

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

3 participants