Instructions to use menglinzhou/MS2LLM-8B-LoRA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use menglinzhou/MS2LLM-8B-LoRA with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("OpenDFM/ChemDFM-v1.5-8B") model = PeftModel.from_pretrained(base_model, "menglinzhou/MS2LLM-8B-LoRA") - Notebooks
- Google Colab
- Kaggle
MS2LLM-8B-LoRA
MS2LLM: 基于化学领域大语言模型 ChemDFM-v1.5-8B 构建,并通过 LoRA 进行质谱领域指令微调。模型将串联质谱(MS/MS)解析建模为“质谱到分子语义”的翻译任务,可综合利用碎片峰、前体离子、分子式以及 DeepMASS 检索得到的结构相似分子等信息,生成可解释的分子描述,包括整体分子骨架、官能团及分子特征,并进行化学类别预测。
MS2LLM 不以直接恢复唯一、完整的分子结构为目标,而是从 MS/MS 中提取具有化学意义的结构语义,可用于未知化合物注释、非靶向代谢组学和天然产物分析等任务。
模型权重: menglinzhou/MS2LLM-8B-LoRA
代码: https://github.com/menglinzhou-bio/MS2LLM
论文: Can Large Language Models Translate MS/MS into Molecular Caption?
DOI: 10.1021/acs.analchem.6c02505
English Introduction
MS2LLM is a chemistry-oriented large language model designed to translate tandem mass spectrometry (MS/MS) data into interpretable molecular descriptions.
The model is based on ChemDFM-v1.5-8B and fine-tuned using LoRA (Low-Rank Adaptation) for MS/MS interpretation. Instead of reconstructing an exact molecular structure, MS2LLM generates chemically meaningful structural semantics, including molecular scaffolds, functional groups, molecular features, and chemical taxonomy.
Model Details
- Model name: MS2LLM-8B-LoRA
- Base model: OpenDFM/ChemDFM-v1.5-8B
- Fine-tuning method: LoRA / PEFT
- Task: MS/MS-to-molecular-description generation
- Domain: Mass spectrometry, metabolomics, natural products, cheminformatics
This repository contains the LoRA adapter weights of MS2LLM.
The ChemDFM-v1.5-8B base model is required for inference.
Inference
This repository provides the LoRA adapter weights of MS2LLM.
The ChemDFM-v1.5-8B base model is required for inference.
For reproducible inference, input formatting, and evaluation, please use the official inference scripts and configurations provided in the MS2LLM GitHub repository:
GitHub: https://github.com/menglinzhou-bio/MS2LLM
The repository provides:
- inference script:
scripts/inference_lora.py - inference configuration:
configs/inference_lora.yaml - example input:
examples/example_questions.json - example output:
examples/example_predictions.jsonl
Please follow the official input format and inference configuration when evaluating MS2LLM. Using different input formats, prompts, or generation settings may lead to results that differ from those reported in the paper.
Limitations
MS2LLM does not aim to deterministically reconstruct an exact molecular structure from an MS/MS spectrum. MS/MS fragmentation contains incomplete and ambiguous structural information, and model outputs should therefore be interpreted as chemically meaningful structural hypotheses rather than definitive compound identifications.
Code
- Downloads last month
- 14
Model tree for menglinzhou/MS2LLM-8B-LoRA
Base model
OpenDFM/ChemDFM-v1.5-8B