[论文解读] Developing ChemDFM as a large language foundation model for chemistry
ChemDFM-13B 是一个针对化学的对话型基础模型,通过领域预训练在 34B 的化学 token 上进行微调,并实现强大的化学特定推理,甚至在许多任务上超越 GPT-4,同时与开源大型语言模型保持竞争。
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).
研究动机与目标
- 推动开发面向化学研究和基于对话的协作(CGI)的化学专用大语言模型。
- 利用领域特定数据(论文、教科书)和分子表示(SMILES)来灌输化学知识和推理。
- 在保持通用语言能力的同时获得化学语言理解,以实现化学领域自由形式对话。
提出的方法
- 两阶段专门化:在化学丰富语料(论文和教科书)+ 通用领域数据上进行领域预训练;使用 Megatron-DeepSpeed 继续对 LLaMa-13B 进行预训练。
- 指令微调,聚焦于化学语言模式,特别是 SMILES 和分子记号,使用多样化的对话格式数据集(MD、TBMD、MPP、RC、MNA、QA、考试),为每个任务提供多重提示并由 GPT-4 进行改写。
- 指令阶段进行全参数微调,以大约 1:2 的比例混合化学领域数据与通用领域数据,以保持广泛的语言能力。
- 数据集组件包括 SMILES 理解(MD、TBMD、MPP、RC、MNA)和自然语言化学问答,以及分子记号的翻译和多模态语言考量。
实验结果
研究问题
- RQ1一个大型语言模型是否能够在自由格式对话中对化学任务进行多样化专门化,同时理解 SMILES、IUPAC 名称和分子式等化学记号?
- RQ2在化学基准测试上,面向化学的 LLM 能在多大程度上达到甚至超过任务特定模型和通用型 LLM?
- RQ3领域特定预训练与指令微调的整合是否能在化学研究场景中实现高效的人机协作?
主要发现
| 模型 | bace | bbb p | CT | HIV | T21 |
|---|---|---|---|---|---|
| Uni-Mol | 85.7 | 72.9 | 91.9 | 80.8 | 79.6 |
| MolXPT | 88.4 | 80.0 | 95.3 | 78.1 | 77.1 |
| InstructMol | 85.9 | 64.0 | - | 74.0 | - |
| GPT-4 | 62.5 | 61.5 | 51.6 | 65.9 | 55.2 |
| LLaMa-2-13B-chat | 26.0 | 60.3 | 45.7 | 29.0 | 51.7 |
| Galactica (30B) | 72.7 | 59.6 | 82.2 | 75.9 | 68.5 |
| ChemDFM-13B | 78.4 | 66.7 | 89.9 | 73.6 | 79.8 |
- ChemDFM-13B 在化学基准测试(ChemLLMBench 和 SciEval)上显著超过代表性开源 LLM。
- 在分子识别任务中,ChemDFM 在名称预测和分子描述生成方面表现出色,甚至在某些名称预测任务上超过 GPT-4。
- 在分子性质预测(MoleculeNet 任务的骨架垂直分割)中,ChemDFM-13B 获得比 GPT-4、LLaMa-2-13B-chat 等 LLM 基线更高的 AUC-ROC。
- 在基于文本的分子设计中,ChemDFM 在大多数指标上优于开源 LLM 和若干专门模型。
- ChemDFM 在反应预测和逆合成任务中表现强劲,常常优于开源 LLM,并在许多任务上接近或超越 GPT-4。
- SciEval 结果显示 ChemDFM 在化学领域作为开源 LLM 中表现最佳,并在生物学和物理领域保持竞争力。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。