模型名称: multimolecule/deltasplice-human
模型链接: HuggingFace | AtomGit 镜像
模型描述: DeltaSplice-Human 是一个基于深度学习的 RNA 剪接位点预测模型,用于预测人类基因组中每个位置的剪接位点使用概率(no_splice / acceptor / donor)。模型基于 DeltaSplice 架构,使用 24 层膨胀卷积神经网络(Dilated CNN)和 5 成员集成学习(ensemble)。
模型架构: Dilated CNN (Conv1d) + BatchNorm + Ensemble (5 members)
参数规模: 约 0.5M 参数
领域: Biology / RNA Splicing
输入规格:
(batch_size, sequence_length) → 内部编码为 (batch_size, 4, sequence_length + context)输出规格:
(batch_size, sequence_length, 3)[no_splice_prob, acceptor_prob, donor_prob]| 依赖项 | 版本要求 | 说明 |
|---|---|---|
| Python | >= 3.10 | 推荐 3.11 |
| torch | >= 2.1.0 | PyTorch 框架 |
| torch_npu | >= 2.1.0 | 昇腾 NPU 后端 |
| transformers | >= 4.0.0 | HuggingFace Transformers |
| multimolecule | >= 0.0.1 | MultiMolecule 生物序列建模库 |
| numpy | >= 1.17 | 数值计算 |
| safetensors | >= 0.4.3 | 安全张量格式 |
| 昇腾驱动 | CANN 8.0+ | 推荐 CANN 8.5.1 |
安装命令:
pip install torch torch-npu transformers multimolecule numpy safetensorsnpu-smi info
python3 -c "import torch_npu; print(torch.npu.device_count(), torch.npu.get_device_name(0))"HF_ENDPOINT=https://hf-mirror.com huggingface-cli download multimolecule/deltasplice-human --local-dir ./model_weights# 单条序列
python inference.py --model-path ./model_weights --sequence "ACGTACGTACGTACGT"
# FASTA文件
python inference.py --model-path ./model_weights --fasta input.fasta
# 指定设备
python inference.py --model-path ./model_weights --device npu:0| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| --model-path | str | 必填 | 模型 checkpoint 路径 |
| --sequence | str | None | DNA/RNA 序列 |
| --fasta | str | None | FASTA 格式文件路径 |
| --batch-size | int | 8 | 批量推理 batch 大小 |
| --device | str | npu:0 | NPU 设备号 |
[模型] multimolecule/deltasplice-human
[设备] Ascend910_9362 (npu:0)
[输入] DNA序列, length=56
[输出] probabilities shape=(56, 3)
[耗时] 214.86 ms
[状态] SUCCESS[基准测试] 3次推理统计:
平均: 125.79 ms
最小: 37.73 ms
最大: 214.86 ms运行命令:
python inference.py --model-path ./model_weights --sequence "ACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGT"输出:
[TEST 1] Sequence length: 56
Sequence (first 50bp): ACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTAC...
Latency: 214.86 ms
Output shape: (56, 3)
Max acceptor prob: 0.0000
Max donor prob: 0.0000
Mean probabilities: no_splice=1.0000, acceptor=0.0000, donor=0.0000
[状态] SUCCESSpython inference.py --model-path ./model_weights --sequence "TGCATGCATGCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN"输出:
[TEST 2] Sequence length: 54
Latency: 50.44 ms
Output shape: (54, 3)
Mean probabilities: no_splice=1.0000, acceptor=0.0000, donor=0.0000
[状态] SUCCESS


算子兼容性验证:
数值一致性验证:
F.one_hot 在 NPU 上有格式警告,不影响计算正确性。