Skip to main content
QUICK REVIEW

[Paper Review] LlaSMol: Advancing Large Language Models for Chemistry with a Large-Scale, Comprehensive, High-Quality Instruction Tuning Dataset

YU Bo-tao, Frazier N. Baker|arXiv (Cornell University)|Feb 14, 2024
Topic ModelingComputer Science12 citations
TL;DR

The paper introduces SMolInstruct, a 3.4M-sample, 14-task instruction-tuning dataset for chemistry, and shows fine-tuned LlaSMol models (based on Galactica, Llama 2, Code Llama, and Mistral) outperforming GPT-4 on chemistry tasks and approaching state-of-the-art task-specific models.

ABSTRACT

Chemistry plays a crucial role in many domains, such as drug discovery and material science. While large language models (LLMs) such as GPT-4 exhibit remarkable capabilities on natural language processing tasks, existing research indicates that their performance on chemistry tasks is discouragingly low. In this paper, however, we demonstrate that our developed LLMs can achieve very strong results on a comprehensive set of chemistry tasks, outperforming the most advanced GPT-4 and Claude 3 Opus by a substantial margin. To accomplish this, we propose SMolInstruct, a large-scale, comprehensive, and high-quality dataset for instruction tuning. It contains 14 selected chemistry tasks and over three million samples, laying a solid foundation for training and evaluating LLMs for chemistry. Using SMolInstruct, we fine-tune a set of open-source LLMs, among which, we find that Mistral serves as the best base model for chemistry tasks. Our analysis further demonstrates the critical role of the proposed dataset in driving the performance improvements.

Motivation & Objective

  • Motivate the need for LLMs in chemistry beyond task-specific models.
  • Provide a large-scale, high-quality instruction-tuning dataset for chemistry tasks.
  • Demonstrate that fine-tuned LLMs can outperform GPT-4 on diverse chemistry tasks.
  • Analyze the impact of base model choice and trainable parameters on performance.

Proposed method

  • Construct SMolInstruct with 14 chemistry tasks and over 3M samples from diverse sources.
  • Apply rigorous data cleaning, splitting to avoid leakage, and canonicalize SMILES representations.
  • Fine-tune four open-source LLMs (Galactica, Llama 2, Code Llama, Mistral) using LoRA on SMolInstruct.
  • Evaluate against baselines including GPT-4 and SoTA task-specific models across multiple chemistry tasks.
  • Compare different LoRA configurations to study the effect of trainable parameter size and module selection.
Figure 1 : An overview of tasks in the proposed SMolInstruct dataset.
Figure 1 : An overview of tasks in the proposed SMolInstruct dataset.

Experimental results

Research questions

  • RQ1Can a large-scale, high-quality instruction-tuning dataset enable LLMs to perform a broad set of chemistry tasks effectively?
  • RQ2How does fine-tuning with SMolInstruct compare to zero-shot or non-tuned LLMs on chemistry benchmarks?
  • RQ3What is the impact of base model choice and LoRA parameterization on chemistry task performance?
  • RQ4To what extent can LLMs approach or surpass state-of-the-art task-specific models on chemistry tasks?

Key findings

  • LlaSMol models outperform GPT-4 on all tested chemistry tasks in SMolInstruct.
  • Mistral-based LlaSMol consistently yields the strongest performance among the four base models.
  • With only ~0.59% trainable parameters (~40M of 7B), LlaSMol can approach or surpass SoTA on several tasks (e.g., NC-I2S, PP-SIDER, MC).
  • LlaSMol models sometimes surpass Molinst (Mol-Instructions fine-tuned) on common tasks, indicating the benefits of the larger, higher-quality SMolInstruct dataset.
  • Code Llama and Mistral bases show synergy between programming-language/coding structure and chemical representations, improving SMILES-related tasks.
  • Larger base models and more LoRA modules generally yield better results; however, base-model capability remains a key determinant of performance.
Figure 2 : Performance on the FS task under different LoRA settings and base models.
Figure 2 : Performance on the FS task under different LoRA settings and base models.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.