zjunlp / MolGen-large

huggingface.co
Total runs: 589
24-hour runs: 0
7-day runs: 106
30-day runs: -601
Model's Last Updated: March 04 2024
text-generation

Introduction of MolGen-large

Model Details of MolGen-large

MolGen-large

MolGen-large was introduced in the paper "Domain-Agnostic Molecular Generation with Self-feedback" and first released in this repository . It is a pre-trained molecular generative model built using the 100% robust molecular language representation, SELFIES.

Model description

MolGen-large is the first pre-trained model that only produces chemically valid molecules. With a training corpus of over 100 million molecules in SELFIES representation, MolGen-large learns the intrinsic structural patterns of molecules by mapping corrupted SELFIES to their original forms. Specifically, MolGen-large employs a bidirectional Transformer as its encoder and an autoregressive Transformer as its decoder. Through its carefully designed multi-task molecular prefix tuning (MPT), MolGen-large can generate molecules with desired properties, making it a valuable tool for molecular optimization.

image.png

Intended uses

You can use the raw model for molecule generation or fine-tune it to a downstream task. Please take note that the following examples only demonstrate the utilization of our pre-trained model for molecule generation. See the repository to look for fine-tune details on a task that interests you.

How to use

Molecule generation example:

>>> from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

>>> tokenizer = AutoTokenizer.from_pretrained("zjunlp/MolGen-large")
>>> model = AutoModelForSeq2SeqLM.from_pretrained("zjunlp/MolGen-large")

>>> sf_input = tokenizer("[C][=C][C][=C][C][=C][Ring1][=Branch1]", return_tensors="pt")
>>> # beam search
>>> molecules = model.generate(input_ids=sf_input["input_ids"],
                              attention_mask=sf_input["attention_mask"],
                              max_length=15,
                              min_length=5,
                              num_return_sequences=5,
                              num_beams=5)
>>> sf_output = [tokenizer.decode(g, skip_special_tokens=True, clean_up_tokenization_spaces=True).replace(" ","") for g in molecules]
['[C][=C][C][=C][C][=C][Ring1][=Branch1]',
'[C][=C][C][=C][C][=C][C][=C][Ring1][=Branch1]',
'[C][=C][C][=C][C][=C][Ring1][=Branch1][C][=C][C][=C]',
'[C][=C][C][=C][C][=C][Ring1][=Branch1][C@H1][C][=C][C]',
'[C][=C][C][=C][C][=C][Ring1][=Branch1][C@H1][=C][C][=C]']
BibTeX entry and citation info
@inproceedings{fang2023domain,
  author       = {Yin Fang and
                  Ningyu Zhang and
                  Zhuo Chen and
                  Xiaohui Fan and
                  Huajun Chen},
  title        = {Domain-Agnostic Molecular Generation with Chemical Feedback},
  booktitle    = {{ICLR}},
  publisher    = {OpenReview.net},
  year         = {2024},
  url          = {https://openreview.net/pdf?id=9rPyHyjfwP}
}

Runs of zjunlp MolGen-large on huggingface.co

589
Total runs
0
24-hour runs
71
3-day runs
106
7-day runs
-601
30-day runs

More Information About MolGen-large huggingface.co Model

MolGen-large huggingface.co

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

MolGen-large huggingface.co Url

https://huggingface.co/zjunlp/MolGen-large

zjunlp MolGen-large online free

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

zjunlp MolGen-large online free url in huggingface.co:

https://huggingface.co/zjunlp/MolGen-large

MolGen-large install

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

MolGen-large install url in huggingface.co:

https://huggingface.co/zjunlp/MolGen-large

Url of MolGen-large

MolGen-large huggingface.co Url

Provider of MolGen-large huggingface.co

zjunlp
ORGANIZATIONS

Other API from zjunlp

huggingface.co

Total runs: 1.1K
Run Growth: 363
Growth Rate: 33.21%
Updated:March 04 2024
huggingface.co

Total runs: 36
Run Growth: -50
Growth Rate: -138.89%
Updated:May 06 2024
huggingface.co

Total runs: 16
Run Growth: -14
Growth Rate: -87.50%
Updated:March 21 2023
huggingface.co

Total runs: 11
Run Growth: 0
Growth Rate: 0.00%
Updated:October 01 2025
huggingface.co

Total runs: 10
Run Growth: 3
Growth Rate: 30.00%
Updated:October 01 2025
huggingface.co

Total runs: 3
Run Growth: 0
Growth Rate: 0.00%
Updated:July 28 2023
huggingface.co

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

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:December 07 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:June 09 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:May 10 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:February 17 2023