The MultiMolecule team has confirmed that the provided model and checkpoints are producing the same intermediate representations as the original implementation.
The team releasing ProGen2 did not write this model card for this model so this model card has been written by the MultiMolecule team.
Model Details
ProGen2 is a
GPT-J
-style model pre-trained on a large corpus of protein sequences in a self-supervised fashion. This means that the model was trained on the raw amino acids of protein sequences only, with an automatic process to generate inputs and labels from those sequences. Please refer to the
Training Details
section for more information on the training process.
The model file depends on the
multimolecule
library. You can install it using pip:
pip install multimolecule
Direct Use
Text Generation
You can use this model directly with a pipeline for text generation:
import multimolecule # you must import multimolecule to register modelsfrom transformers import pipeline
generator = pipeline("text-generation", model="multimolecule/progen2-oas")
output = generator("MGHGVSRPPVVTLR", max_new_tokens=50)
Downstream Use
Extract Features
Here is how to use this model to get the features of a given sequence in PyTorch:
from multimolecule import ProteinTokenizer, ProGen2Model
tokenizer = ProteinTokenizer.from_pretrained("multimolecule/progen2-oas")
model = ProGen2Model.from_pretrained("multimolecule/progen2-oas")
text = "MGHGVSRPPVVTLRPAVLDDCPVLWR"input = tokenizer(text, return_tensors="pt")
output = model(**input)
Sequence Classification / Regression
This model is not fine-tuned for any specific task. You will need to fine-tune the model on a downstream task to use it for sequence classification or regression.
Here is how to use this model as backbone to fine-tune for a sequence-level task in PyTorch:
import torch
from multimolecule import ProteinTokenizer, ProGen2ForSequencePrediction
tokenizer = ProteinTokenizer.from_pretrained("multimolecule/progen2-oas")
model = ProGen2ForSequencePrediction.from_pretrained("multimolecule/progen2-oas")
text = "MGHGVSRPPVVTLRPAVLDDCPVLWR"input = tokenizer(text, return_tensors="pt")
label = torch.tensor([1])
output = model(**input, labels=label)
Token Classification / Regression
This model is not fine-tuned for any specific task. You will need to fine-tune the model on a downstream task to use it for token classification or regression.
Here is how to use this model as backbone to fine-tune for a residue-level task in PyTorch:
import torch
from multimolecule import ProteinTokenizer, ProGen2ForTokenPrediction
tokenizer = ProteinTokenizer.from_pretrained("multimolecule/progen2-oas")
model = ProGen2ForTokenPrediction.from_pretrained("multimolecule/progen2-oas")
text = "MGHGVSRPPVVTLRPAVLDDCPVLWR"input = tokenizer(text, return_tensors="pt")
label = torch.randint(2, (len(text), ))
output = model(**input, labels=label)
Training Details
ProGen2 used Causal Language Modeling (CLM) as the pre-training objective: given a protein sequence, the model is trained to predict the next amino acid token autoregressively.
Training Data
The ProGen2 models were pre-trained on protein sequence databases:
Uniref90
: A clustered version of the UniProt database at 90% sequence identity, containing approximately 135 million sequences.
BFD30
: The Big Fantastic Database clustered at 30% sequence identity, containing approximately 2.1 billion sequences.
BFD90
: The Big Fantastic Database clustered at 90% sequence identity, containing approximately 65 million sequences.
OAS
: The Observed Antibody Space database, clustered at 85% sequence identity.
Different model variants were trained on different combinations:
progen2-small, progen2-medium, progen2-base, progen2-large, progen2-xlarge
: Trained on Uniref90 and BFD30.
progen2-bfd90
: Trained on Uniref90 and BFD90.
progen2-oas
: Trained on the OAS database.
Training Procedure
ProGen2 used causal language modeling (CLM) as the pre-training objective.
Pre-training
Batch size: 500K
Steps: 350,000
Optimizer: Adam
Learning rate: 2e-4
Learning rate warm-up: 3000 steps
Weight decay: 0.1
Maximum Gradient Norm: 1.0
Citation
BibTeX
:
@ARTICLE{Nijkamp2023-jz,
title = "{ProGen2}: Exploring the boundaries of protein language models",
author = "Nijkamp, Erik and Ruffolo, Jeffrey A and Weinstein, Eli N and
Naik, Nikhil and Madani, Ali",
abstract = "Attention-based models trained on protein sequences have
demonstrated incredible success at classification and generation
tasks relevant for artificial-intelligence-driven protein
design. However, we lack a sufficient understanding of how very
large-scale models and data play a role in effective protein
model development. We introduce a suite of protein language
models, named ProGen2, that are scaled up to 6.4B parameters and
trained on different sequence datasets drawn from over a billion
proteins from genomic, metagenomic, and immune repertoire
databases. ProGen2 models show state-of-the-art performance in
capturing the distribution of observed evolutionary sequences,
generating novel viable sequences, and predicting protein
fitness without additional fine-tuning. As large model sizes and
raw numbers of protein sequences continue to become more widely
accessible, our results suggest that a growing emphasis needs to
be placed on the data distribution provided to a protein
sequence model. Our models and code are open sourced for
widespread adoption in protein engineering. A record of this
paper's Transparent Peer Review process is included in the
supplemental information.",
journal = "Cell Syst.",
publisher = "Elsevier BV",
volume = 14,
number = 11,
pages = "968--978.e3",
month = nov,
year = 2023,
keywords = "fitness prediction; language modeling; protein design",
copyright = "http://www.elsevier.com/open-access/userlicense/1.0/",
language = "en"
}
The artifacts distributed in this repository are part of the MultiMolecule project.
If you use MultiMolecule in your research, you must cite the MultiMolecule project as follows:
@software{chen_2024_12638419,
author = {Chen, Zhiyuan and Zhu, Sophia Y.},
title = {MultiMolecule},
doi = {10.5281/zenodo.12638419},
publisher = {Zenodo},
url = {https://doi.org/10.5281/zenodo.12638419},
year = 2024,
month = may,
day = 4
}
Contact
Please use GitHub issues of
MultiMolecule
for any questions or comments on the model card.
Please contact the authors of the
ProGen2 paper
for questions or comments on the paper/model.
progen2-oas huggingface.co is an AI model on huggingface.co that provides progen2-oas's model effect (), which can be used instantly with this multimolecule progen2-oas model. huggingface.co supports a free trial of the progen2-oas model, and also provides paid use of the progen2-oas. Support call progen2-oas model through api, including Node.js, Python, http.
progen2-oas huggingface.co is an online trial and call api platform, which integrates progen2-oas's modeling effects, including api services, and provides a free online trial of progen2-oas, you can try progen2-oas online for free by clicking the link below.
multimolecule progen2-oas online free url in huggingface.co:
progen2-oas is an open source model from GitHub that offers a free installation service, and any user can find progen2-oas on GitHub to install. At the same time, huggingface.co provides the effect of progen2-oas install, users can directly use progen2-oas installed effect in huggingface.co for debugging and trial. It also supports api for free installation.