Lost in Chemical Space: Local Open-Source Large Language Models Display Model-Dependent Adherence to Reference Data in Molecular Generation

Large language models (LLMs) can generate drug-like molecules and may be used locally in drug discovery projects where confidentiality and intellectual-property constraints preclude the use of external APIs. Weight quantization enables deployment of large open-source LLMs on limited hardware, but its impact on molecular generation and on the ability of models to follow reference chemical spaces remains poorly understood. Here, we evaluated Gemma-4-31B, GPT-OSS-120B, Mistral-Small-4-119B, and Qwen-3.6-35B-A3B at the BF16 (original precision), Q8, Q6, and Q4 quantization levels in two molecular generation tasks. The models were prompted either to generate small molecules without constraints or to generate drug-like molecules conditioned on 69 reference kinase inhibitors provided in-context. Quantization increased inference throughput in a model-dependent manner, with the largest gains, up to 24-fold increase in performance, occurring for Gemma-4-31B and Qwen-3.6-35B-A3B. In the task of unconstrained generation, model quantization did not affect molecular validity, uniqueness, drug-likeness, diversity and synthesizability. In the task of reference-guided generation, however, the models displayed markedly different levels of adherence to the provided chemical space. Gemma-4-31B was the only model that consistently generated small molecules similar to the reference compounds at all precision levels. Mistral-Small-4-119B and Qwen-3.6-35B-A3B failed to generate small molecules according to the reference chemical space. GPT-OSS-120B showed adherence to the reference molecules at BF16, Q8, and Q6, but lost the capacity to generate molecules in the desired chemical space at the Q4 quantization level. These results show that quantization can substantially improve the performance of local LLMs for molecular generation without compromising output quality, although model selection and validation is essential for guided exploration of the chemical space.

Authors

Institutions

Publication Details

Journal
ChemRxiv
Published
2026-11-06
DOI
https://doi.org/10.26434/chemrxiv.15011763/v2
Primary Topic
Computational Drug Discovery Methods
Type
preprint

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Lost in Chemical Space: Local Open-Source Large Language Models Display Model-Dependent Adherence to Reference Data in Molecular Generation

Leandro Oliveira Bortot, Ariane Nunes‐Alves, Gabriel Filipe Totene, Lucas Abner Caixeta de Oliveira
2 links
ChemRxiv
Computational Drug Discovery Methods
preprint

Lost in Chemical Space: Local Open-Source Large Language Models Display Model-Dependent Adherence to Reference Data in Molecular Generation

Leandro Oliveira Bortot, Ariane Nunes‐Alves, Gabriel Filipe Totene, Lucas Abner Caixeta de Oliveira
preprint en

Abstract

Large language models (LLMs) can generate drug-like molecules and may be used locally in drug discovery projects where confidentiality and intellectual-property constraints preclude the use of external APIs. Weight quantization enables deployment of large open-source LLMs on limited hardware, but its impact on molecular generation and on the ability of models to follow reference chemical spaces remains poorly understood. Here, we evaluated Gemma-4-31B, GPT-OSS-120B, Mistral-Small-4-119B, and Qwen-3.6-35B-A3B at the BF16 (original precision), Q8, Q6, and Q4 quantization levels in two molecular generation tasks. The models were prompted either to generate small molecules without constraints or to generate drug-like molecules conditioned on 69 reference kinase inhibitors provided in-context. Quantization increased inference throughput in a model-dependent manner, with the largest gains, up to 24-fold increase in performance, occurring for Gemma-4-31B and Qwen-3.6-35B-A3B. In the task of unconstrained generation, model quantization did not affect molecular validity, uniqueness, drug-likeness, diversity and synthesizability. In the task of reference-guided generation, however, the models displayed markedly different levels of adherence to the provided chemical space. Gemma-4-31B was the only model that consistently generated small molecules similar to the reference compounds at all precision levels. Mistral-Small-4-119B and Qwen-3.6-35B-A3B failed to generate small molecules according to the reference chemical space. GPT-OSS-120B showed adherence to the reference molecules at BF16, Q8, and Q6, but lost the capacity to generate molecules in the desired chemical space at the Q4 quantization level. These results show that quantization can substantially improve the performance of local LLMs for molecular generation without compromising output quality, although model selection and validation is essential for guided exploration of the chemical space.

ChemRxiv
Brazilian Center for Research in Energy and Materials (BR), Brazilian Biosciences National Laboratory (BR)
Ministério da Ciência, Tecnologia e Inovação, Conselho Nacional de Desenvolvimento Científico e Tecnológico, Centro Nacional de Pesquisa em Energia e Materiais, Laboratório Nacional de Biociências
Computational Drug Discovery Methods
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon