ibm / MoLFormer-XL-both-10pct

huggingface.co
Total runs: 268.2K
24-hour runs: 0
7-day runs: 0
30-day runs: 0
Model's Last Updated: March 31 2024
feature-extraction

Introduction of MoLFormer-XL-both-10pct

Model Details of MoLFormer-XL-both-10pct

MoLFormer-XL-both-10%

MoLFormer is a class of models pretrained on SMILES string representations of up to 1.1B molecules from ZINC and PubChem. This repository is for the model pretrained on 10% of both datasets.

It was introduced in the paper Large-Scale Chemical Language Representations Capture Molecular Structure and Properties by Ross et al. and first released in this repository .

Model Details
Model Description

MoLFormer is a large-scale chemical language model designed with the intention of learning a model trained on small molecules which are represented as SMILES strings. MoLFormer leverges masked language modeling and employs a linear attention Transformer combined with rotary embeddings.

MoLFormer pipeline

An overview of the MoLFormer pipeline is seen in the image above. One can see that the transformer-based neural network model is trained on a large collection of chemical molecules represented by SMILES sequences from two public chemical datasets PubChem and ZINC in a self-supervised fashion. The MoLFormer architecture was designed with an efficient linear attention mechanism and relative positional embeddings with the goal of learning a meaningful and compressed representation of chemical molecules. After training the MoLFormer foundation model was then adopted to different downstream molecular property prediction tasks via fine-tuning on task-specific data. To further test the representative power of MoLFormer, the MoLFormer encodings were used to recover molecular similarity, and analysis on the correspondence between the interatomic spatial distance and attention value for a given molecule was performed.

Intended use and limitations

You can use the model for masked language modeling, but it is mainly intended to be used as a feature extractor or to be fine-tuned for a prediction task. The "frozen" model embeddings may be used for similarity measurements, visualization, or training predictor models. The model may also be fine-tuned for sequence classification tasks (e.g., solubility, toxicity, etc.).

This model is not intended for molecule generation. It is also not tested for molecules larger than ~200 atoms (i.e., macromolecules). Furthermore, using invalid or noncanonical SMILES may result in worse performance.

Example code

Use the code below to get started with the model.

import torch
from transformers import AutoModel, AutoTokenizer

model = AutoModel.from_pretrained("ibm/MoLFormer-XL-both-10pct", deterministic_eval=True, trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained("ibm/MoLFormer-XL-both-10pct", trust_remote_code=True)

smiles = ["Cn1c(=O)c2c(ncn2C)n(C)c1=O", "CC(=O)Oc1ccccc1C(=O)O"]
inputs = tokenizer(smiles, padding=True, return_tensors="pt")
with torch.no_grad():
    outputs = model(**inputs)
outputs.pooler_output
Training Details
Data

We trained MoLFormer-XL on a combination of molecules from the ZINC15 and PubChem datasets. This repository contains the version trained on 10% ZINC + 10% PubChem.

Molecules were canonicalized with RDKit prior to training and isomeric information was removed. Also, molecules longer than 202 tokens were dropped.

Hardware
  • 16 x NVIDIA V100 GPUs
Evaluation

We evaluated MoLFormer by fine-tuning on 11 benchmark tasks from MoleculeNet. The tables below show the performance of different MoLFormer variants:

BBBP HIV BACE SIDER ClinTox Tox21
10% ZINC + 10% PubChem 91.5 81.3 86.6 68.9 94.6 84.5
10% ZINC + 100% PubChem 92.2 79.2 86.3 69.0 94.7 84.5
100% ZINC 89.9 78.4 87.7 66.8 82.2 83.2
MoLFormer-Base 90.9 77,7 82.8 64.8 61.3 43.1
MoLFormer-XL 93.7 82.2 88.2 69.0 94.8 84.7
QM9 QM8 ESOL FreeSolv Lipophilicity
10% ZINC + 10% PubChem 1.7754 0.0108 0.3295 0.2221 0.5472
10% ZINC + 100% PubChem 1.9093 0.0102 0.2775 0.2050 0.5331
100% ZINC 1.9403 0.0124 0.3023 0.2981 0.5440
MoLFormer-Base 2.2500 0.0111 0.2798 0.2596 0.6492
MoLFormer-XL 1.5984 0.0102 0.2787 0.2308 0.5298

We report AUROC for all classification tasks, average MAE for QM9/8, and RMSE for the remaining regression tasks.

Citation
@article{10.1038/s42256-022-00580-7,
  year = {2022},
  title = {{Large-scale chemical language representations capture molecular structure and   properties}},
  author = {Ross, Jerret and Belgodere, Brian and Chenthamarakshan, Vijil and Padhi, Inkit and   Mroueh, Youssef and Das, Payel},
  journal = {Nature Machine Intelligence},
  doi = {10.1038/s42256-022-00580-7},
  pages = {1256--1264},
  number = {12},
  volume = {4}
}
@misc{https://doi.org/10.48550/arxiv.2106.09553,
  doi = {10.48550/ARXIV.2106.09553},
  url = {https://arxiv.org/abs/2106.09553},
  author = {Ross, Jerret and Belgodere, Brian and Chenthamarakshan, Vijil and Padhi, Inkit and Mroueh, Youssef and Das, Payel},
  keywords = {Machine Learning (cs.LG), Computation and Language (cs.CL), Biomolecules (q-bio.BM), FOS: Computer and information sciences, FOS: Computer and information sciences, FOS: Biological sciences, FOS: Biological sciences},
  title = {Large-Scale Chemical Language Representations Capture Molecular Structure and Properties},
  publisher = {arXiv},
  year = {2021},
  copyright = {arXiv.org perpetual, non-exclusive license}
}

Runs of ibm MoLFormer-XL-both-10pct on huggingface.co

268.2K
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs

More Information About MoLFormer-XL-both-10pct huggingface.co Model

More MoLFormer-XL-both-10pct license Visit here:

https://choosealicense.com/licenses/apache-2.0

MoLFormer-XL-both-10pct huggingface.co

MoLFormer-XL-both-10pct huggingface.co is an AI model on huggingface.co that provides MoLFormer-XL-both-10pct's model effect (), which can be used instantly with this ibm MoLFormer-XL-both-10pct model. huggingface.co supports a free trial of the MoLFormer-XL-both-10pct model, and also provides paid use of the MoLFormer-XL-both-10pct. Support call MoLFormer-XL-both-10pct model through api, including Node.js, Python, http.

MoLFormer-XL-both-10pct huggingface.co Url

https://huggingface.co/ibm/MoLFormer-XL-both-10pct

ibm MoLFormer-XL-both-10pct online free

MoLFormer-XL-both-10pct huggingface.co is an online trial and call api platform, which integrates MoLFormer-XL-both-10pct's modeling effects, including api services, and provides a free online trial of MoLFormer-XL-both-10pct, you can try MoLFormer-XL-both-10pct online for free by clicking the link below.

ibm MoLFormer-XL-both-10pct online free url in huggingface.co:

https://huggingface.co/ibm/MoLFormer-XL-both-10pct

MoLFormer-XL-both-10pct install

MoLFormer-XL-both-10pct is an open source model from GitHub that offers a free installation service, and any user can find MoLFormer-XL-both-10pct on GitHub to install. At the same time, huggingface.co provides the effect of MoLFormer-XL-both-10pct install, users can directly use MoLFormer-XL-both-10pct installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

MoLFormer-XL-both-10pct install url in huggingface.co:

https://huggingface.co/ibm/MoLFormer-XL-both-10pct

Url of MoLFormer-XL-both-10pct

MoLFormer-XL-both-10pct huggingface.co Url

Provider of MoLFormer-XL-both-10pct huggingface.co

ibm
ORGANIZATIONS

Other API from ibm

huggingface.co

Total runs: 28.6K
Run Growth: 0
Growth Rate: 0.00%
Updated:November 12 2024
huggingface.co

Total runs: 17.7K
Run Growth: 0
Growth Rate: 0.00%
Updated:August 17 2024
huggingface.co

Total runs: 15.3K
Run Growth: 0
Growth Rate: 0.00%
Updated:September 25 2024
huggingface.co

Total runs: 11.6K
Run Growth: 0
Growth Rate: 0.00%
Updated:September 16 2024
huggingface.co

Total runs: 11.2K
Run Growth: 0
Growth Rate: 0.00%
Updated:March 05 2024
huggingface.co

Total runs: 2.2K
Run Growth: 0
Growth Rate: 0.00%
Updated:August 17 2024
huggingface.co

Total runs: 344
Run Growth: 0
Growth Rate: 0.00%
Updated:December 21 2022
huggingface.co

Total runs: 157
Run Growth: 0
Growth Rate: 0.00%
Updated:December 28 2023
huggingface.co

Total runs: 103
Run Growth: 0
Growth Rate: 0.00%
Updated:October 12 2022
huggingface.co

Total runs: 90
Run Growth: 0
Growth Rate: 0.00%
Updated:February 07 2023
huggingface.co

Total runs: 57
Run Growth: 0
Growth Rate: 0.00%
Updated:March 05 2024
huggingface.co

Total runs: 56
Run Growth: 0
Growth Rate: 0.00%
Updated:October 09 2024
huggingface.co

Total runs: 23
Run Growth: 0
Growth Rate: 0.00%
Updated:September 15 2023
huggingface.co

Total runs: 18
Run Growth: 0
Growth Rate: 0.00%
Updated:September 15 2023
huggingface.co

Total runs: 16
Run Growth: 0
Growth Rate: 0.00%
Updated:September 15 2023