/ Модель

Характеристики

Контекст
1 024 токена
Лицензия
CC BY-NC 4.0
Архитектура
prot2text · dense
Библиотека
transformers
Опубликована
13 сен 2024

Esm2Text-Base-v1-1

Генерация текстаТекст → текст

Модель генерирует текстовые описания предполагаемой функции белка по его аминокислотной последовательности.

489скачиваний за 30 дней0лайковвеса обновлены23 окт 2025

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Esm2Text-Base-v1-1 — модель семейства Prot2Text, разработанного исследователями DaSciM в École Polytechnique и коллегами. Она генерирует текстовое описание функции белка по его аминокислотной последовательности. В отличие от вариантов Prot2Text, которым нужны структура и последовательность белка, эта модель принимает только последовательность.

Архитектура Prot2Text сочетает графовые нейронные сети и трансформеры в схеме encoder-decoder; для этого варианта README отдельно указывает использование последовательности. Семейство обучалось на датасете из 256 690 белков SwissProt с текстовыми описаниями. Модель предназначена для исследовательского анализа функций белков и генерации их описаний, а не для медицинских решений. Лицензия — CC BY-NC 4.0, допускающая использование с указанием авторства, но не коммерческое.

Сценарии применения

  • получение текстового описания функции белка по последовательности
  • предварительная аннотация белков в исследовательских проектах
  • сопоставление сгенерированных описаний функций белков с курируемыми аннотациями

Ограничения

Модель предназначена для теоретического моделирования; её выводы требуют осторожной проверки и не заменяют профессиональные медицинские рекомендации. Лицензия CC BY-NC 4.0 ограничивает коммерческое использование.

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Prot2Text Model Card

Model Information

Model Page: Prot2Text Paper: https://arxiv.org/abs/2307.14367 Github: https://github.com/hadi-abdine/Prot2Text Authors: Hadi Abdine(1), Michail Chatzianastasis(1), Costas Bouyioukos(2, 3), Michalis Vazirgiannis(1) (1)DaSciM, LIX, École Polytechnique, Institut Polytechnique de Paris, France. (2)Epigenetics and Cell Fate, CNRS UMR7216, Université Paris Cité, Paris, France. (3)Bioinformatics Research Laboratory, Department of Biological Sciences, University of Cyprus, Nicosia, Cyprus.

Prot2Text paper is published in AAAI 2024. Preliminary versions of the paper were accepted as a spotlight at DGM4H@NeurIPS 2023 and AI4Science@NeurIPS 2023.

@inproceedings{abdine2024prot2text,
  title={Prot2Text: Multimodal Protein's Function Generation with GNNs and Transformers},
  author={Abdine, Hadi and Chatzianastasis, Michail and Bouyioukos, Costas and Vazirgiannis, Michalis},
  booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
  volume={38},
  pages={10757--10765},
  year={2024}
}

Description

Prot2Text is a family of models that predict a protein's function in a free text style, moving beyond the conventional binary or categorical classifications. By combining Graph Neural Networks(GNNs) and Large Language Models(LLMs), in an encoder-decoder framework. Prot2Text effectively integrates diverse data types including protein sequence, structure, and textual annotation and description. This multimodal approach allows for a holistic representation of proteins' functions, enabling the generation of detailed and accurate functional descriptions.

Prot2Text is trained on a multimodal dataset that consists of 256,690 proteins. For each protein, we have three information: the correspond- ing sequence, the AlphaFold accession ID and the textual description. To build this dataset, we used the SwissProt database the only curated proteins knowledge base with full proteins’ textual description included in the UniProtKB Consortium (2016) Release 2022_04.

Models and Results

Model#paramsBLEU ScoreROUGE-1ROUGE-2ROUGE-LBERT ScoreLink
Prot2TextSMALL256M30.0145.7838.0843.9782.60v1.0- v1.1
Prot2TextBASE283M35.1150.5942.7148.4984.30v1.0- v1.1
Prot2TextMEDIUM398M36.5152.1344.1750.0484.83v1.0- v1.1
Prot2TextLARGE898M36.2953.6845.6051.4085.20v1.0- v1.1
Esm2TextBASE225M32.1147.4639.1845.3183.21v1.0- v1.1

The reported results are computed using v1.0

Usage

Below we share some code snippets on how to get quickly started with running the model. First, install the Transformers library, graphein, DSSP, torch and torch geometric with:

pip install -U transformers
git clone https://github.com/a-r-j/graphein.git
pip install -e graphein/
pip install torch
pip install torch_geometric
pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv
sudo apt-get install dssp
sudo ln -s /usr/bin/mkdssp /usr/bin/dssp

You might need to install different versions/variants according to your environnement.

Then, copy the snippet from the section that is relevant for your usecase.

Running Prot2Text to generate a protein's function using both its structure and sequence

To generate a protein's function using both its structure and amino-acid sequence, you need to load one of Prot2Text models and choose the AlphaFold database ID of the protein.

from transformers import AutoModelForCausalLM, AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained('habdine/Prot2Text-Base-v1-1', 
                                            trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained('habdine/Prot2Text-Base-v1-1', 
                                            trust_remote_code=True)

function = model.generate_protein_description(protein_pdbID='Q10MK9', 
                                              tokenizer=tokenizer, 
                                              device='cuda' # replace with 'mps' to run on a Mac device
                                              )

print(function)
# 'Carboxylate--CoA ligase that may use 4-coumarate as substrate. Follows a two-step reaction mechanism, wherein the carboxylate substrate first undergoes adenylation by ATP, followed by a thioesterification in the presence of CoA to yield the final CoA thioester.'

Running Esm2Text to generate a protein's function using only its sequence

To generate a protein's function using only its amino-acid sequence, you need to load Esm2Text-Base model and pass an amino-acid sequence.

from transformers import AutoModelForCausalLM, AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained('habdine/Esm2Text-Base-v1-1', 
                                            trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained('habdine/Esm2Text-Base-v1-1', 
                                            trust_remote_code=True)

function = model.generate_protein_description(protein_sequence='AEQAERYEEMVEFMEKL', 
                                              tokenizer=tokenizer, 
                                              device='cuda' # replace with 'mps' to run on a Mac device
                                              )

print(function)
# 'A cytochrome b6-f complex catalyzes the calcium-dependent hydrolysis of the 2-acyl groups in 3-sn-phosphoglycerides. Its physiological function is not known.'

Notice

THE INFORMATION PROVIDED IS THEORETICAL MODELLING ONLY AND CAUTION SHOULD BE EXERCISED IN ITS USE. IT IS PROVIDED "AS-IS" WITHOUT ANY WARRANTY OF ANY KIND, WHETHER EXPRESSED OR IMPLIED. NO WARRANTY IS GIVEN THAT USE OF THE INFORMATION SHALL NOT INFRINGE THE RIGHTS OF ANY THIRD PARTY. THE INFORMATION IS NOT INTENDED TO BE A SUBSTITUTE FOR PROFESSIONAL MEDICAL ADVICE, DIAGNOSIS, OR TREATMENT, AND DOES NOT CONSTITUTE MEDICAL OR OTHER PROFESSIONAL ADVICE.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Нельзя запустить

Модели нужен код из репозитория; автор пока не в списке доверенных организаций.

Класс архитектуры
Prot2TextModel
Ревизия весов
97498de

0 моделей