/ Модель

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

Лицензия
Apache 2.0
Архитектура
SMI-TED · dense
Библиотека
transformers
Опубликована
25 июл 2024

materials.smi-ted

ЭмбеддингиТекст → embedding3 профессии

SMI-TED — трансформерный энкодер-декодер IBM для получения векторных представлений молекул из SMILES и решения задач химического прогнозирования.

153скачиваний за 30 дней38лайковвеса обновлены2 июл 2025

Бенчмарки

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

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

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

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

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

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

SMI-TED — химическая языковая модель IBM Research, построенная как трансформерный энкодер-декодер для работы со строками SMILES. Модель предварительно обучена на 91 млн молекул из PubChem; в публикации описаны варианты размером 289 млн и 8×289 млн параметров. Репозиторий содержит веса PyTorch и safetensors, а в Hugging Face модель помечена для извлечения признаков.

Модель предназначена для преобразования SMILES в векторные представления и их применения в задачах классификации, регрессии и предсказания квантовых свойств молекул. Декодер также позволяет восстанавливать строки SMILES из представлений. Предобучение включало маскирование токенов и реконструкцию SMILES; в обучающих данных длина соединений ограничивалась 202 токенами.

Модель ориентирована на химию и материаловедение, использует строки SMILES и не описана как мультимодальная. Лицензия репозитория — Apache-2.0. В README сообщается о конкурентных результатах на наборах MoleculeNet и результатах уровня state of the art на ряде бенчмарков, однако конкретные гарантии качества для каждой задачи не приводятся.

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

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

Ограничения

Предобучающий набор ограничивал длину молекул 202 токенами. README не приводит подробных метрик для каждой задачи и не уточняет языковую поддержку помимо представления SMILES.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

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

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

Открыть на Hugging Face

Introduction to IBM's Foundation Models for Materials

Welcome to IBM's series of large foundation models for sustainable materials. Our models span a variety of representations and modalities, including SMILES, SELFIES, 3D atom positions, 3D density grids, molecular graphs, and other formats. These models are designed to support and advance research in materials science and chemistry.

GitHub: GitHub Link

Paper (pre-print): arXiv:2407.20267

Paper: Communications Chemistry

SMILES-based Transformer Encoder-Decoder (SMI-TED)

smi-ted

This repository provides PyTorch source code associated with our publication, "A Large Encoder-Decoder Family of Foundation Models for Chemical Language".

Paper: Arxiv Link

We provide the model weights in two formats:

For more information contact: eduardo.soares@ibm.com or evital@br.ibm.com.

Introduction

We present a large encoder-decoder chemical foundation model, SMILES-based Transformer Encoder-Decoder (SMI-TED), pre-trained on a curated dataset of 91 million SMILES samples sourced from PubChem, equivalent to 4 billion molecular tokens. SMI-TED supports various complex tasks, including quantum property prediction, with two main variants (289M and 8X289M). Our experiments across multiple benchmark datasets demonstrate state-of-the-art performance for various tasks. For more information contact: eduardo.soares@ibm.com or evital@br.ibm.com.

Table of Contents

  1. Getting Started
    1. Pretrained Models and Training Logs
    2. Replicating Conda Environment
  2. Pretraining
  3. Finetuning
  4. Feature Extraction
  5. Citations

Getting Started

This code and environment have been tested on Nvidia V100s and Nvidia A100s

Pretrained Models and Training Logs

We provide checkpoints of the SMI-TED model pre-trained on a dataset of ~91M molecules curated from PubChem. The pre-trained model shows competitive performance on classification and regression benchmarks from MoleculeNet.

Add the SMI-TED pre-trained weights.pt to the inference/ or finetune/ directory according to your needs. The directory structure should look like the following:

inference/
├── smi_ted_light
│   ├── smi_ted_light.pt
│   ├── bert_vocab_curated.txt
│   └── load.py

and/or:

finetune/
├── smi_ted_light
│   ├── smi_ted_light.pt
│   ├── bert_vocab_curated.txt
│   └── load.py

Replicating Conda Environment

Follow these steps to replicate our Conda environment and install the necessary libraries:

Create and Activate Conda Environment

conda create --name smi-ted-env python=3.10
conda activate smi-ted-env

Install Packages with Conda

conda install pytorch=2.1.0 pytorch-cuda=11.8 -c pytorch -c nvidia

Install Packages with Pip

pip install -r requirements.txt
pip install pytorch-fast-transformers

Pretraining

For pretraining, we use two strategies: the masked language model method to train the encoder part and an encoder-decoder strategy to refine SMILES reconstruction and improve the generated latent space.

SMI-TED is pre-trained on canonicalized and curated 91M SMILES from PubChem with the following constraints:

  • Compounds are filtered to a maximum length of 202 tokens during preprocessing.
  • A 95/5/0 split is used for encoder training, with 5% of the data for decoder pretraining.
  • A 100/0/0 split is also used to train the encoder and decoder directly, enhancing model performance.

The pretraining code provides examples of data processing and model training on a smaller dataset, requiring 8 A100 GPUs.

To pre-train the two variants of the SMI-TED model, run:

bash training/run_model_light_training.sh

or

bash training/run_model_large_training.sh

Use train_model_D.py to train only the decoder or train_model_ED.py to train both the encoder and decoder.

Finetuning

The finetuning datasets and environment can be found in the finetune directory. After setting up the environment, you can run a finetuning task with:

bash finetune/smi_ted_light/esol/run_finetune_esol.sh

Finetuning training/checkpointing resources will be available in directories named checkpoint_<measure_name>.

Feature Extraction

The example notebook smi_ted_encoder_decoder_example.ipynb contains code to load checkpoint files and use the pre-trained model for encoder and decoder tasks. It also includes examples of classification and regression tasks.

To load smi-ted, you can simply use:

model = load_smi_ted(
    folder='../inference/smi_ted_light',
    ckpt_filename='smi_ted_light.pt'
)

or

with open('model_weights.bin', 'rb') as f:
    state_dict = torch.load(f)
    model.load_state_dict(state_dict)
)

To encode SMILES into embeddings, you can use:

with torch.no_grad():
    encoded_embeddings = model.encode(df['SMILES'], return_torch=True)

For decoder, you can use the function, so you can return from embeddings to SMILES strings:

with torch.no_grad():
    decoded_smiles = model.decode(encoded_embeddings)

Citations

@article{soares2025open,
  title     = {An open-source family of large encoder-decoder foundation models for chemistry},
  author    = {Soares, Eduardo and Vital Brazil, Emilio and Shirasuna, Victor and Zubarev, Dmitry and Cerqueira, Renato and Schmidt, Kristin},
  journal   = {Communications Chemistry},
  volume    = {8},
  pages     = {193},
  year      = {2025},
  publisher = {Nature Portfolio},
  doi       = {10.1038/s42004-025-01585-0},
  url       = {https://doi.org/10.1038/s42004-025-01585-0}
}
@misc{soares2024largeencoderdecoderfamilyfoundation,
      title={A Large Encoder-Decoder Family of Foundation Models For Chemical Language}, 
      author={Eduardo Soares and Victor Shirasuna and Emilio Vital Brazil and Renato Cerqueira and Dmitry Zubarev and Kristin Schmidt},
      year={2024},
      eprint={2407.20267},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2407.20267}, 
}

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

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

GPU в ailist

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

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

Архитектура SMI-TED неизвестна transformers в образе рантайма.

Ревизия весов
414c3ea

0 моделей