First of all thanks you for putting this module in place, I wish I knew it a bit earlier.
Just a suggestion, what you guys think about wrapping the above code in a method call set_model
This can help in case , where the model was not directly from hugging face. For example, I am playing with a model that was customized and has a custom initialization method. In those cases, it can be useful to override the set_model and keep using the code.
If you guys are okay with this approach I can make a pull request on the weekend to suggest the change.
https://github.com/Lightning-AI/lightning-transformers/blob/7c691e77c9e8828405b8495ae6a69dc4887e29ec/lightning_transformers/core/model.py#L58
First of all thanks you for putting this module in place, I wish I knew it a bit earlier.
Just a suggestion, what you guys think about wrapping the above code in a method call
set_model
This can help in case , where the model was not directly from hugging face. For example, I am playing with a model that was customized and has a custom initialization method. In those cases, it can be useful to override the
set_model
and keep using the code.If you guys are okay with this approach I can make a pull request on the weekend to suggest the change.
Regarrds.