MolT5
A T5 encoder-decoder pretrained on both natural language text and molecule strings.
Molecules, proteins and genomics · 1,681 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Parameters
- 222.9M
- Operations
- 1,681
- Framework
- PyTorch
- Recurrent
- No
- Published
- EMNLP 2022
- Cited by
- 175 (as of 26 October 2026)
- Authors
- Carl Edwards, Tuan Lai, Kevin Ros and others
- Source
- GitHub: blender-nlp/MolT5
- License
- BSD-3-Clause
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m18509
- Graph hash
- 63d3984a1cb865db985e0c50ff0f2fbae8a642d9105ea4296635005208301905
- Skeleton hash
- deb6ab79fce702403d389006b95aea9048b0924874202b06d7be7435d8a5d66a
- Architecture hash
- 5dea3beafb3cd2992d8e3866a5a8eedeefd0c640817ec52fbb7087e793a81c42
- Diagram SHA-256
- d9f78f2174d7c0d1dbd1f12a52732930cb7786b84c057c0191d7d7c1153bc001
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
How this diagram was made
transformers.T5ForConditionalGeneration()
What it is
MolT5, short for Molecular T5, is a self-supervised framework for pretraining a model on unlabeled natural language text and molecule strings. The paper proposes two tasks for it: molecule captioning, where a molecule given as a SMILES string is described in words, and text-guided molecule generation.
The network is an encoder-decoder Transformer initialized from a public checkpoint of T5.1.1. Each pretraining step samples a minibatch containing both natural language sequences and SMILES sequences. Spans of corrupted tokens are replaced by a sentinel token, and the model has to predict the dropped-out spans. The text side is the Colossal Clean Crawled Corpus (C4), and the molecule side is the 100 million SMILES strings used in Chemformer. The paper describes this as training a single language model on two monolingual corpora with no explicit alignment between them.
After pretraining, the model is fine-tuned on ChEBI-20, a set of 33,010 molecule-description pairs. The authors' repository lists three pretrained checkpoints, molt5-small, molt5-base and molt5-large, at roughly 77 million, 250 million and 800 million parameters. The paper also reports that a default T5 model, pretrained only on text data, generates molecules that are often valid and much closer to the ground truth than those of an RNN baseline.
Key idea. MolT5 pretrains models on large amounts of unlabeled natural language text and molecule strings, which enables molecule captioning and text-based molecule generation.
- molt5
- molecular t5
- molecule captioning
- text-based molecule generation
- molecule-language translation
- smiles
- smiles2caption
- caption2smiles
- text to molecule
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{edwards2022translationmoleculesnaturallanguage,
title={Translation between Molecules and Natural Language},
author={Carl Edwards and Tuan Lai and Kevin Ros and Garrett Honke and Kyunghyun Cho and Heng Ji},
year={2022},
eprint={2204.11817},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2204.11817},
}