/ Модель

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

Лицензия
Apache 2.0
Библиотека
transformers
Опубликована
30 июл 2026

chemberta-zinc100m-smilestok

Заполнение пропусковТекст → текст

Энкодер RoBERTa, обученный на SMILES для заполнения пропусков, получения молекулярных эмбеддингов и дообучения для предсказания свойств соединений.

1скачиваний за 30 дней0лайковвеса обновлены31 июл 2026

Бенчмарки

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

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

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

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

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

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

ChemBERTa-ZINC100M-SmilesTok — химическая языковая модель в стиле RoBERTa, разработанная Andrew Boldi. Это энкодер на 86,5 млн параметров, обученный masked language modeling на примерно 100 млн SMILES из ZINC20. В отличие от оригинальной ChemBERTa-100M-MLM, модель использует токенизацию на уровне атомов по регулярному выражению Schwaller и словарь из 581 токена.

Модель предназначена для заполнения пропусков в SMILES, получения молекулярных эмбеддингов и дообучения для предсказания свойств молекул. В тестах на MoleculeNet показала результаты, сопоставимые с BPE-версией ChemBERTa-77M, и в среднем немного превзошла её по ROC-AUC. Модель ориентирована на лекарственно-подобные соединения, представленные в ZINC20.

Обучение охватывало SMILES длиной до 126 токенов. Модель может хуже работать на химических структурах, слабо представленных в ZINC20, включая природные соединения, макроциклы и стереохимически сложные структуры. Она не предназначена для клинических или критичных с точки зрения безопасности решений. Лицензия — Apache-2.0.

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

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

Ограничения

Модель обучена на лекарственно-подобных соединениях ZINC20 и может хуже работать на природных продуктах, макроциклах и других слабо представленных химических структурах. Обучение охватывало SMILES длиной до 126 токенов; модель не предназначена для клинических и критичных для безопасности решений.

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

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

Открыть на Hugging Face

ChemBERTa-ZINC100M-SmilesTok

A RoBERTa-style chemical language model pre-trained with masked-language modeling (MLM) on ~100M SMILES from ZINC20, using an atom-level SMILES tokenizer (Schwaller regex) rather than byte-pair encoding. It is a faithful reproduction of the ChemBERTa-100M-MLM recipe whose single deliberate change is the tokenizer. This card documents the full training setup, dynamics, and the observations and decisions made during pre-training.

Quick start

from transformers import AutoTokenizer, AutoModel, AutoModelForMaskedLM
import torch

repo = "andrewboldi/chemberta-zinc100m-smilestok"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModel.from_pretrained(repo)               # encoder, for embeddings
# or AutoModelForMaskedLM.from_pretrained(repo)       # for fill-mask

inputs = tok("CC(=O)Oc1ccccc1C(=O)O", return_tensors="pt")  # aspirin
with torch.no_grad():
    h = model(**inputs).last_hidden_state[:, 0]       # [CLS] representation

The tokenizer ships as a portable tokenizer.json (no custom code, no deepchem dependency).

Architecture

FamilyRoBERTa, encoder-only
Layers / hidden / heads / FFN12 / 768 / 12 / 3072
Parameters~86.5M
Max positions512 (trained on ≤128)
Vocabulary581 atom-level tokens
ObjectiveMasked language modeling, 15% masking

Tokenization

Atom-level tokenization with the Schwaller SMILES regex (the scheme used by DeepChem's SmilesTokenizer): multi-character atoms and bracketed groups such as Cl, Br, [N+], [O-], [nH] are single tokens. The 581-token vocabulary covers drug/lead-like chemistry with ≈0% unknown tokens on ZINC20 and on the MoleculeNet evaluation sets. The released tokenizer.json is verified to reproduce the training tokenization exactly on 15k+ held-out SMILES. This is the one intentional deviation from the original ChemBERTa-100M-MLM, which used a byte-pair-encoding tokenizer.

Pre-training data

~100M SMILES from ZINC20 (xchen16/zinc20). Because ZINC20 is ordered by molecule size, the corpus was assembled by sampling shards at a fixed stride across the full size range (every 10th tranche) so the training distribution spans small-to-large molecules rather than a size-biased prefix. SMILES are canonicalized with RDKit and packed (int16 token ids) for training.

Pre-training procedure

ObjectiveMLM, 15% masking
OptimizerAdamW, β=(0.9, 0.95), weight decay 0.01
Learning rate1e-4, linear warmup (6,000 steps), cosine decay
Gradient clipping0.5
Precisionbf16 autocast
Batch size64
Scheduleone full epoch over ~100M molecules (1,558,643 steps)
Hardwarea single consumer RTX 4060 Laptop (8 GB)

Optimization & stability

Higher learning rates were unstable at this scale: 5e-4 and 2e-4 both trained well early but diverged late in the schedule. Training was stabilized with lr 1e-4, β₂ = 0.95, and gradient clipping at 0.5, which trained cleanly for the full epoch with no divergence.

Validation protocol

Validation MLM loss is measured on a representative random hold-out of 5,000 SMILES sampled across the whole corpus. (An early contiguous "first-N" split was rejected because, on the size-ordered packed data, it is a biased small-molecule slice and gives misleadingly high, erratic loss; a random hold-out is the faithful measure.) Held-out MLM loss decreased monotonically through training and continued to improve into the second half of the epoch (the language model did not overfit).

Training dynamics & scaling observation

Downstream task performance saturates early. Intermediate checkpoints (20%, 45%, and 55% of one epoch) were fine-tuned on the full MoleculeNet classification suite (6 tasks, Bemis–Murcko scaffold split). The 6-task mean ROC-AUC was essentially flat:

checkpointmean ROC-AUC (6 tasks)
20% of epoch0.722
45% of epoch0.724
55% of epoch0.726

The change from 20%→55% is +0.004 — within run-to-run noise (individual tasks moved ±0.05 in both directions). Over the same range, held-out MLM loss kept falling: the language-modeling objective continued to improve while the downstream property-prediction signal had already plateaued. In other words, most of the transferable representation is learned in the first ~20% of one epoch on this corpus.

Decision: despite this early saturation, pre-training was nonetheless carried to a full epoch — to remove any ambiguity about convergence and to provide a clean, fully-trained single-epoch checkpoint for reuse and reproduction.

Evaluation

Evaluated on the MoleculeNet benchmark following the ChemBERTa protocol: 80/10/10 Bemis–Murcko scaffold split, fine-tune up to 25 epochs with early stopping on validation ROC-AUC. Classification tasks report ROC-AUC (and PRC-AUC for the class-imbalanced sets); multi-task datasets average over tasks. Numbers below are for the final (end-of-epoch) checkpoint.

DatasetTasksROC-AUCPRC-AUC
BBBP10.7190.750
BACE10.8270.853
ClinTox20.7310.683
Tox21120.7430.332
SIDER270.6090.645
HIV10.7320.153

Comparison to a byte-pair-encoding baseline

To situate the atom-level tokenizer, this model is compared against DeepChem/ChemBERTa-77M-MLM — the canonical BPE-tokenized ChemBERTa — under the identical downstream protocol (same Bemis–Murcko scaffold splits, same 25-epoch fine-tuning and hyperparameters), each model using its own tokenizer. Test ROC-AUC:

DatasetThis model (atom-level)ChemBERTa-77M-MLM (BPE)Δ
BBBP0.7190.701+0.018
BACE0.8270.837−0.010
ClinTox0.7310.663+0.067
Tox210.7430.720+0.023
SIDER0.6090.536+0.073
HIV0.7320.747−0.016
Mean0.7270.701+0.026

Under matched downstream evaluation the atom-level model is competitive with, and on average modestly ahead of, the BPE baseline (+0.026 mean ROC-AUC; higher on 4 of 6 datasets). This is not a controlled tokenizer ablation: the two checkpoints also differ in pre-training corpus (ZINC20 vs. PubChem) and corpus size (~100M vs. 77M molecules), so the difference reflects the combined effect of tokenizer, data, and scale — not tokenization in isolation. It is reported to show that the atom-level tokenizer is not a downgrade under standard evaluation, not to claim tokenizer superiority on its own.

Intended uses & limitations

A general-purpose chemical language model: molecular embeddings, property-prediction fine-tuning, and fill-mask over SMILES.

Distribution & limitations. The model is trained on ZINC20, a database of purchasable, drug/lead-like compounds (largely make-on-demand synthetic libraries). It is therefore well-matched to medicinal-chemistry property prediction but out-of-distribution on chemistry under-represented in ZINC20 — notably natural products and other high-Fsp³, stereochemically dense, macrocyclic or polycyclic scaffolds. Training used sequences of ≤126 SMILES tokens; much longer SMILES are out of the trained range. Not intended for clinical or safety-critical decisions.

Training compute & reproducibility

One epoch over ~100M molecules (1,558,643 optimizer steps) on a single RTX 4060 Laptop (8 GB), bf16, batch size 64. Training, tokenizer construction, and evaluation are fully scripted and reproducible.

License & citations

Released under the Apache License 2.0.

  • ZINC20 — Irwin et al., J. Chem. Inf. Model. 60(12), 2020.
  • Atom-level SMILES tokenization — Schwaller et al., ACS Cent. Sci. 5(9), 2019; DeepChem SmilesTokenizer.
  • ChemBERTa — Chithrananda, Grand, Ramsundar, 2020.
  • MoleculeNet — Wu et al., Chem. Sci. 9, 2018.

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

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

GPU в ailist

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

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

Доступ к модели ограничен автором; у платформы нет доступа к весам.

Ревизия весов
58fbda7

0 моделей