Literature · entropy
gpt2 zinc 87m
An 87-million-parameter autoregressive language model for generating druglike SMILES strings and molecular embeddings.
What gpt2 zinc 87m is
gpt2 zinc 87m is an autoregressive generative model developed by entropy. Built upon the GPT-2 transformer architecture, it is trained to model chemical structures represented as Simplified Molecular Input Line Entry System (SMILES) strings, using approximately 480 million entries drawn from the ZINC database.
The model assists computational chemists and drug discovery researchers in de novo molecular generation and molecular representation learning. By treating chemical notation as a sequential language task, it can either sample novel druglike chemical structures or produce latent embedding vectors from hidden states for downstream analytical tasks.
This tool is intended strictly for research purposes. It is not a clinical tool or medical device and must not be used for clinical decisions, patient diagnosis, or treatment planning.
How it works
The model employs a standard GPT-2 causal language model architecture with approximately 87 million parameters.
During training, input sequences were bracketed by beginning-of-sequence and end-of-sequence tokens. For generation, sampling can be steered using temperature adjustments across a maximum context length of 256 tokens. Molecular embeddings are derived by passing tokenised SMILES strings through the model, extracting the final hidden layer outputs, and computing a masked mean pooling across the sequence.
Key facts
- Architecture
- GPT-2 causal language model
- Parameter count
- Approximately 87 million
- Training data
- Approximately 480 million SMILES strings from the ZINC database
- Training iterations
- 175,000
- Batch size
- 3,072
- Maximum context length
- 256 tokens
- Input format
- SMILES text prompt
- Output format
- Generated SMILES text or hidden-state embeddings
What you can use it for
- De novo molecule generation
- Sampling novel druglike candidate structures by autoregressively completing SMILES strings from a start-of-sequence token.
- Molecular embedding extraction
- Deriving continuous latent vector representations of chemical structures from the model's final hidden states for computational analysis.
- Chemical library expansion
- Generating large batches of diverse chemical strings with high validity and uniqueness across various sampling temperatures.
Run it here
No installation and no GPU of your own: fill in the inputs and it runs on our servers. Results stay in your browser unless you sign in.
Runs on On-demand GPU
Runs on our servers with on-demand compute. A first run needs time to load the model; active capacity can be reused and scales down when idle.Run this model
gpt2 zinc 87m
Strengths and limits
Good at
- Trained on an extensive dataset of approximately 480 million SMILES strings from the ZINC collection.
Watch out for
- For research use only: it is not a medical device and must not be used for diagnosis, treatment or any clinical decision.
- The standard GPT2TokenizerFast tokenizer does not automatically add the required beginning-of-sequence and end-of-sequence special tokens, requiring manual string formatting prior to tokenisation.
- The maximum sequence length demonstrated is restricted to 256 tokens, which limits the size of SMILES strings that can be processed.
- It cannot be used for clinical decision-making, medical diagnosis, or treatment.
Inputs and outputs
You provide
Prompt
The model continues from here.
You get back
The model's completion.
gpt2 zinc 87m API
The same run, from your own code: one HTTP request with an API key, billed in the same credits as the Run button. A fast run answers with its outputs; a longer one answers with a poll_url to read.
curl https://corollary-labs.com/api/v1/models/entropy-gpt2-zinc-87m/runs \
-H "Authorization: Bearer $COROLLARY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"inputs": {
"text": "<Prompt>"
}
}'Make an API key, then read the models reference.
Licence
Commercial use permitted · mit
mit, as the repository declares it. Read by the catalogue intake on 2026-11-28.
Questions
Can I use gpt2 zinc 87m commercially?
Commercial use permitted. mit, as the repository declares it. Read by the catalogue intake on 2026-11-28.
How do I run gpt2 zinc 87m without installing anything?
Use the form under “Run it here” on this page: fill in the inputs and press Run model. It runs on our servers on CPU only, typically in 40s, and a run costs about 28 credits. Visitors without an account get 1,000 credits a month.
What training data was used for this model?
The model was trained on roughly 480 million SMILES strings retrieved from the ZINC chemical database.
Why do special tokens need to be added manually?
The model was trained using beginning-of-sequence and end-of-sequence tokens, but the associated fast tokenizer does not automatically append these tokens even when instructed to add special tokens.
Can this model be used to extract chemical representations?
Yes, latent molecular representations can be extracted by pulling the hidden states from the final layer and calculating a masked average across sequence tokens.
Written from gpt2 zinc 87m's own documentation (model card). Statements citing a figure that does not appear there are removed before publication. Licence and running details come from our registry.
