🚀 PlantCaduceus - 植物DNA語言模型
PlantCaduceus是一個基於16種被子植物基因組進行預訓練的DNA語言模型。它利用Caduceus和Mamba架構以及掩碼語言建模目標,旨在從跨越1.6億年曆史的16個物種中學習進化保守性和DNA序列語法。
🚀 快速開始
PlantCaduceus提供了一系列不同參數規模的模型,可根據具體需求進行選擇。對於零樣本得分估計,強烈建議使用最大的模型 PlantCaduceus_l32。
✨ 主要特性
- 多物種學習:基於16種被子植物基因組進行預訓練,能夠學習到跨越1.6億年曆史的進化保守性和DNA序列語法。
- 多模型選擇:提供了不同參數規模的模型,可根據具體任務需求進行選擇。
📦 安裝指南
暫未提供具體的安裝步驟,你可以根據代碼示例中的依賴進行安裝,確保安裝 transformers
和 torch
庫。
💻 使用示例
基礎用法
from transformers import AutoModel, AutoModelForMaskedLM, AutoTokenizer
import torch
model_path = 'kuleshov-group/PlantCaduceus_l32'
device = "cuda:0" if torch.cuda.is_available() else "cpu"
model = AutoModelForMaskedLM.from_pretrained(model_path, trust_remote_code=True, device_map=device)
model.eval()
tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
sequence = "ATGCGTACGATCGTAG"
encoding = tokenizer.encode_plus(
sequence,
return_tensors="pt",
return_attention_mask=False,
return_token_type_ids=False
)
input_ids = encoding["input_ids"].to(device)
with torch.inference_mode():
outputs = model(input_ids=input_ids, output_hidden_states=True)
📚 詳細文檔
模型參數
屬性 |
詳情 |
模型類型 |
PlantCaduceus系列模型,包括PlantCaduceus_l20、PlantCaduceus_l24、PlantCaduceus_l28和PlantCaduceus_l32 |
訓練數據 |
16種被子植物基因組 |
模型選擇建議
對於零樣本得分估計,建議使用最大的模型 PlantCaduceus_l32。
📄 許可證
本項目採用Apache-2.0許可證。
📚 引用信息
如果你使用了本模型,請引用以下論文:
@article {Zhai2024.06.04.596709,
author = {Zhai, Jingjing and Gokaslan, Aaron and Schiff, Yair and Berthel, Ana and Liu, Zong-Yan and Miller, Zachary R and Scheben, Armin and Stitzer, Michelle C and Romay, Cinta and Buckler, Edward S. and Kuleshov, Volodymyr},
title = {Cross-species plant genomes modeling at single nucleotide resolution using a pre-trained DNA language model},
elocation-id = {2024.06.04.596709},
year = {2024},
doi = {10.1101/2024.06.04.596709},
URL = {https://www.biorxiv.org/content/early/2024/06/05/2024.06.04.596709},
eprint = {https://www.biorxiv.org/content/early/2024/06/05/2024.06.04.596709.full.pdf},
journal = {bioRxiv}
}
📞 聯繫方式
如果你有任何問題或建議,請聯繫 Jingjing Zhai (jz963@cornell.edu)。