evolutionaryscale / esm

Other
763 stars 78 forks source link

How to use downloaded weights #16

Open Samuel-gwb opened 3 days ago

Samuel-gwb commented 3 days ago

Great work!

After execution following in python shell: model: ESM3InferenceClient = ESM3.from_pretrained("esm3_sm_open_v1").to("cuda")

I've succeeded downloading the weights into following path: ~/.cache/huggingface/hub/models--EvolutionaryScale--esm3-sm-open-v1/snapshots/66ecd636588d3100e13598a5720678db6583d01c/data/weights

The weight files are links to blobs directory. In this python shell I can succeed generate new sequences and pdbs following README.

However, when I try a new python shell, re-execution of above command do not load these weights. How to re-use the downloaded weights?

Many thanks!

ebetica commented 2 days ago

We're just using HuggingFace, could you refer to the HuggingFace documentation for help? https://github.com/evolutionaryscale/esm/blob/e9f060214d19a6420a69cd1187fdaf81978791fc/esm/utils/constants/esm3.py#L110