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

Is there a way to convert the trained model into huggingface format? #27

Open
hohoCode opened this issue Dec 1, 2024 · 1 comment
Open

Comments

@hohoCode
Copy link

hohoCode commented Dec 1, 2024

Is there a way to convert the trained model into huggingface format?

So people can just use Huggingface's AutoModel.from_pretrained("...") normally as always with your models. Easier for everything.

Thanks.

@Andron00e
Copy link
Collaborator

Hi @hohoCode!

Unfortunately, you cannot do this by design. To make our custom model compatible with AutoModel.from_pretrained("...") one should:

  1. modify our model's class to inherit from PreTrainedModel
  2. create a custom config class that inherits from PretrainedConfig
  3. register your model and config

If you have found our codebase useful, feel free to submit your PR so you can help improve it)

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

2 participants