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

[Future] Enable Users to Use Models Off-the-shelf #26

Open
abheesht17 opened this issue Mar 18, 2022 · 2 comments
Open

[Future] Enable Users to Use Models Off-the-shelf #26

abheesht17 opened this issue Mar 18, 2022 · 2 comments
Labels
enhancement New feature or request low priority

Comments

@abheesht17
Copy link
Collaborator

Often, users don't want to train the model; they just want to load the pretrained weights (which we can provide - we can perhaps upload them on Google Drive) and use the model for inference. So, we need to write a generic .from_pretrained() function. The usage of this can be something like this:

from src.models.caml import CAML
trained_model = CAML.from_pretrained("<weight-file-path>.pt")
@abheesht17 abheesht17 added enhancement New feature or request low priority labels Mar 18, 2022
@dalgu90
Copy link
Owner

dalgu90 commented Mar 18, 2022

I saw this in Transformer, and I think this is a really cool feature if we have it in the framework. To implement it, we need this from_pretrained() needs model information (like the config we used to initialize the model) in addition to the weights. We can have that information in the weight file, or as a separate input argument of the method.

@abheesht17
Copy link
Collaborator Author

Exactly! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low priority
Projects
None yet
Development

No branches or pull requests

2 participants