westlake-repl / SaProt

[ICLR'24 spotlight] Saprot: Protein Language Model with Structural Alphabet
MIT License
323 stars 32 forks source link

How / where do I tell SaProt to use the fine tuned model? #35

Closed nogako closed 3 months ago

nogako commented 3 months ago

I'm a newcomer in this field so my question my be trivial. But I'm trying to do mutation prediction using SaProt with the Thermostability fine tuned model. How or where do I tell SaProt to use the fine tuned model?

Thanks in advance.

LTEnjoy commented 3 months ago

Hi!

You can load the fine-tuned model through the from_checkpoint argument. e.g.,

config = {
    ...,
    "from_checkpoint": "your/path/to/weight.pt"
}

model = SaprotRegressionModel(**config)
nogako commented 3 months ago

Thank you very much. Where from do I import "SaprotRegressionModel"?

LTEnjoy commented 3 months ago

Please fitst git clone the newest repo, and then import SaprotRegressionModel by:

from model.saprot.saprot_regression_model import SaprotRegressionModel
nogako commented 3 months ago

Thank you