Transformers
Safetensors
English
esmfold2
biology
esm
protein
protein-structure-prediction
structure-prediction
protein-design
3d-structure
confidence-estimation
molecular-dynamics
custom_code
Run this model with HF Jobs
Run biohub/ESMFold2.1-Fast on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/biohub/ESMFold2.1-Fast. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/biohub/ESMFold2.1-Fast on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use biohub/ESMFold2.1-Fast with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use biohub/ESMFold2.1-Fast with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("biohub/ESMFold2.1-Fast", trust_remote_code=True) model = AutoModel.from_pretrained("biohub/ESMFold2.1-Fast", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload README.md with huggingface_hub
Browse files52 unmodified lines53545556575859602 unmodified lines636465666768697020 unmodified lines9192939495969727 unmodified lines12512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917052 unmodified linespip install esm```The examples below also work with the 2.1 checkpoints. For local inference, pass `"biohub/ESMFold2.1-Fast"` or `"biohub/ESMFold2.1"` to `from_pretrained`.You can fold your first protein with:```py2 unmodified lines# Ubiquitin (PDB 1UBQ)sequence = "MQIFVKTLTGKTITLEVEPSDTIENVKAKIQDKEGIPPDQQRLIFAGKQLEDGRTLSDYNIQKESTLHLVLRLRGG"# optionally use "biohub/ESMFold2"model = EsmFold2Model.from_pretrained("biohub/ESMFold2-Fast", device_map="auto").eval()output = model.infer_protein(sequence, num_loops=3, num_sampling_steps=50)print(f"pLDDT mean: {float(output['plddt'].mean()):.3f}, pTM: {float(output['ptm'].mean()):.3f}")20 unmodified lines"YKVHPSTSQAYKQFGNSVVINVLQYIAYNIGSSLNFKPY")model = EsmFold2Model.from_pretrained("biohub/ESMFold2", device="cuda").eval()spi = StructurePredictionInput(sequences=[27 unmodified lines```pyimport osfrom esm.models.esmfold2 import (DNAInput,LigandInput,Modification,ProteinInput,StructurePredictionInput,)from esm.sdk import esmfold2_clientfrom esm.sdk.api import FoldingConfigHHAI_SEQ = ("MIEIKDKQLTGLRFIDLFAGLGGFRLALESCGAECVYSNEWDKYAQEVYEMNFGEKPEGDITQVNEKTIPDH""DILCAGFPCQAFSISGKQKGFEDSRGTLFFDIARIVREKKPKVVFMENVKNFASHDNGNTLEVVKNTMNELD""YSFHAKVLNALDYGIPQKRERIYMICFRNDLNIQNFQFPKPFELNTFVKDLLLPDSEVEHLVIDRKDLVMTN""QEIEQTTPKTVRLGIVGKGGQGERIYSTRGIAITLSAYGGGIFAKTGGYLVNGKTRKLHPRECARVMGYPDS""YKVHPSTSQAYKQFGNSVVINVLQYIAYNIGSSLNFKPY")client = esmfold2_client(model="esmfold2-fast-2026-05", token=os.environ["ESM_API_KEY"])spi = StructurePredictionInput(sequences=[ProteinInput(id="A", sequence=HHAI_SEQ),DNAInput(id="B",sequence="GATAGCGCTATC",modifications=[Modification(position=5, ccd="C36")],),DNAInput(id="C",sequence="TGATAGCGCTATC",modifications=[Modification(position=6, ccd="C36")],),LigandInput(id="L", ccd=["SAH"]),])result = client.fold_all_atom(spi, config=FoldingConfig(num_loops=3, num_sampling_steps=50))print(f"pLDDT mean: {float(result.plddt.mean()):.3f}, pTM: {float(result.ptm):.3f}, ipTM: {float(result.iptm):.3f}")```For multi-chain complexes (e.g. antibody–antigen), you can supply paired MSAs to take advantage of inter-chain co-evolution. See the [ESMFold2 tutorial](https://github.com/biohub/esm/blob/main/cookbook/tutorials/esmfold2.ipynb) for details.52 unmodified lines5354555657582 unmodified lines616263646566676820 unmodified lines8990919293949527 unmodified lines12312412512612712812913013113213313413513613752 unmodified linespip install esm```You can fold your first protein with:```py2 unmodified lines# Ubiquitin (PDB 1UBQ)sequence = "MQIFVKTLTGKTITLEVEPSDTIENVKAKIQDKEGIPPDQQRLIFAGKQLEDGRTLSDYNIQKESTLHLVLRLRGG"# optionally use "biohub/ESMFold2.1"model = EsmFold2Model.from_pretrained("biohub/ESMFold2.1-Fast", device_map="auto").eval()output = model.infer_protein(sequence, num_loops=3, num_sampling_steps=50)print(f"pLDDT mean: {float(output['plddt'].mean()):.3f}, pTM: {float(output['ptm'].mean()):.3f}")20 unmodified lines"YKVHPSTSQAYKQFGNSVVINVLQYIAYNIGSSLNFKPY")model = EsmFold2Model.from_pretrained("biohub/ESMFold2.1", device="cuda").eval()spi = StructurePredictionInput(sequences=[27 unmodified lines```pyimport osfrom esm.sdk import esmfold2_clientfrom esm.sdk.api import ESMProteinErrorclient = esmfold2_client(model="esmfold2.1-fast", token=os.environ["ESM_API_KEY"])ubiquitin = "MQIFVKTLTGKTITLEVEPSDTIENVKAKIQDKEGIPPDQQRLIFAGKQLEDGRTLSDYNIQKESTLHLVLRLRGG"result = client.fold(sequence=ubiquitin)if isinstance(result, ESMProteinError):raise resultresult.to_pdb("ubiquitin.pdb")```For multi-chain complexes (e.g. antibody–antigen), you can supply paired MSAs to take advantage of inter-chain co-evolution. See the [ESMFold2 tutorial](https://github.com/biohub/esm/blob/main/cookbook/tutorials/esmfold2.ipynb) for details.
README.md+11-44