Views
No views yet
[!TIP] The MultiMolecule team has confirmed that the provided model and checkpoints are producing the same intermediate representations as the original implementation.
| Variants | Num Layers | Hidden Size | Num Heads | Intermediate Size | Num Parameters (M) | FLOPs (G) | MACs (G) | Max Num Tokens |
|---|---|---|---|---|---|---|---|---|
| ProGen2-xlarge | 32 | 4096 | 16 | 16384 | 6443.66 | 6735.76 | 3367.27 | 1024 |
| ProGen2-large | 2560 | 32 | 10240 | 2517.34 | 2664.21 | 1331.45 | ||
| ProGen2-bfd90 | ||||||||
| ProGen2-base | 27 | 1536 | 16 | 6144 | 764.81 | 826.85 | 413.12 | 2048 |
| ProGen2-oas | 1024 | |||||||
| ProGen2-medium | ||||||||
| ProGen2-small | 12 | 1024 | 4096 | 151.15 | 167.74 | 83.75 |
multimolecule library. You can install it using pip:pip install multimolecule1import multimolecule # you must import multimolecule to register models
2from transformers import pipeline
3
4generator = pipeline("text-generation", model="multimolecule/progen2-xlarge")
5output = generator("MGHGVSRPPVVTLR", max_new_tokens=50)1from multimolecule import ProteinTokenizer, ProGen2Model
2
3
4tokenizer = ProteinTokenizer.from_pretrained("multimolecule/progen2-xlarge")
5model = ProGen2Model.from_pretrained("multimolecule/progen2-xlarge")
6
7text = "MGHGVSRPPVVTLRPAVLDDCPVLWR"
8input = tokenizer(text, return_tensors="pt")
9
10output = model(**input)[!NOTE] 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.
1import torch
2from multimolecule import ProteinTokenizer, ProGen2ForSequencePrediction
3
4
5tokenizer = ProteinTokenizer.from_pretrained("multimolecule/progen2-xlarge")
6model = ProGen2ForSequencePrediction.from_pretrained("multimolecule/progen2-xlarge")
7
8text = "MGHGVSRPPVVTLRPAVLDDCPVLWR"
9input = tokenizer(text, return_tensors="pt")
10label = torch.tensor([1])
11
12output = model(**input, labels=label)[!NOTE] 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.
1import torch
2from multimolecule import ProteinTokenizer, ProGen2ForTokenPrediction
3
4
5tokenizer = ProteinTokenizer.from_pretrained("multimolecule/progen2-xlarge")
6model = ProGen2ForTokenPrediction.from_pretrained("multimolecule/progen2-xlarge")
7
8text = "MGHGVSRPPVVTLRPAVLDDCPVLWR"
9input = tokenizer(text, return_tensors="pt")
10label = torch.randint(2, (len(text), ))
11
12output = model(**input, labels=label)1@ARTICLE{Nijkamp2023-jz,
2 title = "{ProGen2}: Exploring the boundaries of protein language models",
3 author = "Nijkamp, Erik and Ruffolo, Jeffrey A and Weinstein, Eli N and
4 Naik, Nikhil and Madani, Ali",
5 abstract = "Attention-based models trained on protein sequences have
6 demonstrated incredible success at classification and generation
7 tasks relevant for artificial-intelligence-driven protein
8 design. However, we lack a sufficient understanding of how very
9 large-scale models and data play a role in effective protein
10 model development. We introduce a suite of protein language
11 models, named ProGen2, that are scaled up to 6.4B parameters and
12 trained on different sequence datasets drawn from over a billion
13 proteins from genomic, metagenomic, and immune repertoire
14 databases. ProGen2 models show state-of-the-art performance in
15 capturing the distribution of observed evolutionary sequences,
16 generating novel viable sequences, and predicting protein
17 fitness without additional fine-tuning. As large model sizes and
18 raw numbers of protein sequences continue to become more widely
19 accessible, our results suggest that a growing emphasis needs to
20 be placed on the data distribution provided to a protein
21 sequence model. Our models and code are open sourced for
22 widespread adoption in protein engineering. A record of this
23 paper's Transparent Peer Review process is included in the
24 supplemental information.",
25 journal = "Cell Syst.",
26 publisher = "Elsevier BV",
27 volume = 14,
28 number = 11,
29 pages = "968--978.e3",
30 month = nov,
31 year = 2023,
32 keywords = "fitness prediction; language modeling; protein design",
33 copyright = "http://www.elsevier.com/open-access/userlicense/1.0/",
34 language = "en"
35}[!NOTE] The artifacts distributed in this repository are part of the MultiMolecule project. If MultiMolecule supports your research, please cite the MultiMolecule project as follows:
1@software{chen_2024_12638419,
2 author = {Chen, Zhiyuan and Zhu, Sophia Y.},
3 title = {MultiMolecule},
4 doi = {10.5281/zenodo.12638419},
5 publisher = {Zenodo},
6 url = {https://doi.org/10.5281/zenodo.12638419},
7 year = 2024,
8 month = may,
9 day = 4
10}SPDX-License-Identifier: AGPL-3.0-or-later