esm2 t33 650M UR50D
Overview
Highlights
- High-performance protein sequence embeddings for downstream ML tasks
- Efficient 650M parameter architecture for faster inference
- Predicts structural properties from primary amino acid sequences
- Seamless integration with PyTorch and Hugging Face Transformers
- Permissive MIT license for commercial and research use
Usage
# Install Hugging Face transformers
pip install transformers torch
# Load model with transformers
from transformers import AutoModel, AutoTokenizer
model = AutoModel.from_pretrained("facebook/esm2_t33_650M_UR50D")
tokenizer = AutoTokenizer.from_pretrained("facebook/esm2_t33_650M_UR50D")
Hugging Face Download
We recommend downloading the model via the Hugging Face CLI or Hub SDK.
Guidance:Before downloading, install huggingface_hub with:
pip install -U huggingface_hub
CLI Download
Download the full repository
huggingface-cli download facebook/esm2_t33_650M_UR50D
Download a single file to a local folder (e.g. config.json into ./dir)
huggingface-cli download facebook/esm2_t33_650M_UR50D config.json --local-dir ./dir
See the official docs for more CLI options
SDK Download
# 模型下载
from huggingface_hub import snapshot_download
model_dir = snapshot_download('facebook/esm2_t33_650M_UR50D')
Git Download
Make sure git-lfs is installed first
git lfs install
git clone https://huggingface.co/facebook/esm2_t33_650M_UR50D
To skip LFS large-file downloads, use:
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/facebook/esm2_t33_650M_UR50D
Model files are hosted on the Hugging Face Hub — download directly via HF CLI / SDK / Git, not through this site.
PyTorch / Transformers Usage
Install Transformers
pip install -U transformers torch
Load the model and run inference
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained('facebook/esm2_t33_650M_UR50D')
tokenizer = AutoTokenizer.from_pretrained('facebook/esm2_t33_650M_UR50D')
Model Download
We recommend downloading the model via the ModelScope CLI or SDK.
Guidance:Before downloading, install ModelScope with:
pip install modelscope
CLI Download
Download the full repository
modelscope download --model facebook/esm2_t33_650M_UR50D
Download a single file to a local folder (e.g. README.md into ./dir)
modelscope download --model facebook/esm2_t33_650M_UR50D README.md --local_dir ./dir
See the docs for more CLI options
SDK Download
# 模型下载
from modelscope import snapshot_download
model_dir = snapshot_download('facebook/esm2_t33_650M_UR50D')
Git Download
Make sure git-lfs is installed first
git lfs install
git clone https://www.modelscope.cn/facebook/esm2_t33_650M_UR50D.git
To skip LFS large-file downloads, use:
GIT_LFS_SKIP_SMUDGE=1 git clone https://www.modelscope.cn/facebook/esm2_t33_650M_UR50D.git
ModelScope 模型页直接下载模型文件;无需将模型文件放在本站服务器。
Notebook Quickstart
Install the ModelScope library
pip install "modelscope[audio,cv,nlp,multi-modal,science]" -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html
Load the model and run inference
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks
p = pipeline('text-generation', 'facebook/esm2_t33_650M_UR50D')
Full Documentation
---
license: mit
widget:
- text: "MQIFVKTLTGKTITLEVEPS<mask>TIENVKAKIQDKEGIPPDQQRLIFAGKQLEDGRTLSDYNIQKESTLHLVLRLRGG"
---
ESM-2
ESM-2 is a state-of-the-art protein model trained on a masked language modelling objective. It is suitable for fine-tuning on a wide range of tasks that take protein sequences as input. For detailed information on the model architecture and training data, please refer to the accompanying paper. You may also be interested in some demo notebooks (PyTorch, TensorFlow) which demonstrate how to fine-tune ESM-2 models on your tasks of interest.
Several ESM-2 checkpoints are available in the Hub with varying sizes. Larger sizes generally have somewhat better accuracy, but require much more memory and time to train:
| Checkpoint name | Num layers | Num parameters |
|------------------------------|----|----------|
| esm2_t48_15B_UR50D | 48 | 15B |
| esm2_t36_3B_UR50D | 36 | 3B |
| esm2_t33_650M_UR50D | 33 | 650M |
| esm2_t30_150M_UR50D | 30 | 150M |
| esm2_t12_35M_UR50D | 12 | 35M |
| esm2_t6_8M_UR50D | 6 | 8M |