🚀 PlantCaduceus - 植物DNA语言模型
PlantCaduceus是一个基于16种被子植物基因组进行预训练的DNA语言模型。它利用Caduceus和Mamba架构以及掩码语言建模目标,旨在从跨越1.6亿年进化历史的16个物种中学习进化保守性和DNA序列语法。
🚀 快速开始
本项目提供了一系列不同参数规模的PlantCaduceus模型,你可以根据需求选择合适的模型。对于零样本得分估计,我们强烈建议使用最大的模型 PlantCaduceus_l32。
✨ 主要特性
💻 使用示例
基础用法
from transformers import AutoModel, AutoModelForMaskedLM, AutoTokenizer
import torch
model_path = 'kuleshov-group/PlantCaduceus_l20'
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 |
训练数据 |
16种被子植物基因组 |
模型列表
📄 许可证
本项目采用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)。