[Paper Review] Developing ChemDFM as a large language foundation model for chemistry
ChemDFM-13B is a chemistry-specialized dialogue foundation model trained via domain pre-training on 34B chemical tokens and instruction tuning, achieving strong chemistry-specific reasoning and even outperforming GPT-4 on many tasks while remaining competitive with open-source LLMs.
Artificial intelligence (AI) has played an increasingly important role in chemical research. However, most models currently used in chemistry are specialist models that require training and tuning for specific tasks. A more generic and efficient solution would be an AI model that could address many tasks and support free-form dialogue in the broad field of chemistry. In its utmost form, such a generalist AI chemist could be referred to as Chemical General Intelligence. Large language models (LLMs) have recently logged tremendous success in the general domain of natural language processing, showing emerging task generalization and free-form dialogue capabilities. However, domain knowledge of chemistry is largely missing when training general-domain LLMs. The lack of such knowledge greatly hinders the performance of generalist LLMs in the field of chemistry. To this end, we develop ChemDFM, a pioneering LLM for chemistry trained on 34B tokens from chemical literature and textbooks, and fine-tuned using 2.7M instructions. As a result, it can understand and reason with chemical knowledge in free-form dialogue. Quantitative evaluations show that ChemDFM significantly surpasses most representative open-source LLMs. It outperforms GPT-4 on a great portion of chemical tasks, despite the substantial size difference. We have open-sourced the inference codes, evaluation datasets, and model weights of ChemDFM on Huggingface (https://huggingface.co/OpenDFM/ChemDFM-v1.0-13B).
Motivation & Objective
- Motivate the development of a chemistry-specialized large language model to support chemical research and dialogue-based collaboration (CGI).
- Leverage domain-specific data (papers, textbooks) and molecule representations (SMILES) to instill chemical knowledge and reasoning.
- Preserve general-language capabilities while acquiring chemical language understanding for free-form dialogue in chemistry.
Proposed method
- Two-stage specialization: Domain Pre-training on a chemistry-rich corpus (papers and textbooks) plus general-domain data; continues pre-training of LLaMa-13B with Megatron-DeepSpeed.
- Instruction Tuning focused on chemistry language patterns, especially SMILES and molecular notations, using a diverse, dialogue-formatted dataset (MD, TBMD, MPP, RC, MNA, QA, exams) constructed with multiple prompts per task and rephrased by GPT-4.
- Full-parameter tuning during instruction phase, mixing chemical-domain with general-domain data in a roughly 1:2 ratio to preserve broad language capabilities.
- Dataset components include SMILES understanding (MD, TBMD, MPP, RC, MNA) and natural-language chemistry QA, plus molecule-notational translations and multi-modal language considerations.
Experimental results
Research questions
- RQ1Can a large language model be specialized to perform diverse chemistry tasks in free-form dialogue while understanding chemical notations like SMILES, IUPAC names, and formulas?
- RQ2To what extent can a chemistry-focused LLM match or surpass task-specific models and generalist LLMs on chemistry benchmarks?
- RQ3Does integration of domain-specific pre-training and instruction tuning enable effective human-AI collaboration in chemical research scenarios?
Key findings
- ChemDFM-13B significantly outperforms representative open-source LLMs on chemistry benchmarks (ChemLLMBench and SciEval).
- In molecule recognition tasks, ChemDFM achieves superior name prediction and molecule captioning performance, even surpassing GPT-4 on some name-prediction tasks.
- On molecular property prediction (MoleculeNet tasks with scaffold-vertical split), ChemDFM-13B attains higher AUC-ROC than LLM baselines like GPT-4 and LLaMa-2-13B-chat.
- In text-based molecule design, ChemDFM outperforms open-source LLMs and several specialist models across most metrics.
- ChemDFM achieves strong performance in reaction prediction and retrosynthesis tasks, often outperforming open-source LLMs and approaching or surpassing GPT-4 on many tasks.
- SciEval results show ChemDFM performing best among open-source LLMs in chemistry and maintaining competitive results in biology and physics.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.