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

How to add presets with custom license #1797

Closed
gcuder opened this issue Aug 26, 2024 · 2 comments
Closed

How to add presets with custom license #1797

gcuder opened this issue Aug 26, 2024 · 2 comments

Comments

@gcuder
Copy link

gcuder commented Aug 26, 2024

Is your feature request related to a problem? Please describe.

I'd like to add presets from hugging face in my own and want others to benefit from it. However, some of them, i.e. https://huggingface.co/GerMedBERT/medbert-512 have custom licensing.

Can I still add them to Keras? If yes, how should the licensing part be handled?

@divyashreepathihalli
Copy link
Collaborator

@gcuder thanks for filing the issue. KerasNLP supports loading presets from HuggingFace as well. As long as you are able to add the license on Huggingface you can just point to the HF url and use the preset with the Keras model.
example code snippet
model.from_preset("hf://username/model_name")
Also FYI: Any code that is released with KerasNLP should be releasable with the Apache 2.0 license.

@mattdangerw
Copy link
Member

Yup echoing what @divyashreepathihalli said! We support loading from either Huggingface's model hub or Kaggle's model hub. As long as the models comply with any requirements for those platforms, they are fully usable with our library.

To add code here (e.g. a new arch), we need to code to be permissively licensed. Otherwise we'd need to move the implementation to a separate repo with a new license.

I think that covers it so closing this issue, but feel free to reopen if anything is unclear.

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

No branches or pull requests

5 participants
@mattdangerw @gcuder @sachinprasadhs @divyashreepathihalli and others