facebookresearch / esm

Evolutionary Scale Modeling (esm): Pretrained language models for proteins
MIT License
3.16k stars 627 forks source link

download model from huggingface #447

Closed saeid976 closed 1 year ago

saeid976 commented 1 year ago

Hi dear support team

I want to use your awesome transformer, but our HPC cluster does not have internet access due to firewall restriction. I download model and config, ... files from huggingface (https://huggingface.co/facebook/esm2_t33_650M_UR50D/tree/main), i try to load model with: path = Path(file).resolve().parent.joinpath('esm') model, alphabet = esm.pretrained(path) This trick dont work! and this error occur: TypeError: 'module' object is not callable

How i can to load model?

Thanks

tomsercu commented 1 year ago

The model and config from huggingface should be used with the huggingface transformers library. You can look at this PR for a script to download all model weights and then a flag --model-dir for the script scripts/esmfold_inference.py https://github.com/facebookresearch/esm/pull/371/files

saeid976 commented 1 year ago

thanks dear Tom

i have another question! i try to install open-fold to using ESMFold but this error occur:

pip install -q git+https://github.com/aqlaboratory/openfold.git@"6908936b68ae89f67755240e2f588c09ec31d4c8" error: subprocess-exited-with-error

× git clone --quiet https://github.com/aqlaboratory/openfold.git /tmp/pip-req-build-19duubeb did not run successfully. │ exit code: 128 ╰─> [2 lines of output] error: The requested URL returned error: 403 Forbidden while accessing https://github.com/aqlaboratory/openfold.git/info/refs fatal: HTTP request failed [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

× git clone --quiet https://github.com/aqlaboratory/openfold.git /tmp/pip-req-build-19duubeb did not run successfully. │ exit code: 128 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

how i can install it?

tomsercu commented 1 year ago

something seems wrong with the double quotes here, the command you issue is different than what we list in the readme. If this persists please open a new issue. Thanks!