SmileyLlama: Modifying Large Language Models for Directed Chemical Space Exploration
This work addresses the challenge of transforming general-purpose large language models (LLMs) into attribute-controllable molecular generators. We propose a lightweight adaptation paradigm that converts open-source Llama models into chemical language models (CLMs) via supervised fine-tuning (SFT) and direct preference optimization (DPO), enabling direct SMILES string generation conditioned on multidimensional physicochemical properties (e.g., logP, aqueous solubility). To our knowledge, this is the first empirical demonstration that an adapted general LLM achieves performance on multi-objective molecular generation tasks comparable to or exceeding that of domain-specific chemically pretrained models. The approach enables a paradigm shift from “chemical knowledge question-answering” to “property-directed molecular design,” significantly enhancing controllability, interpretability, and interactive exploration of chemical space.