模型名称: multimolecule/openspliceai-mane.10000
模型链接: HuggingFace
模型描述: OpenSpliceAI 是一个 dilated CNN 模型,用于预测 RNA 剪接位点。对每个核苷酸位置进行三分类:no-splice(非剪接位点)/ acceptor(受体剪接位点)/ donor(供体剪接位点)。
模型架构: Dilated CNN (Dilated Convolutional Neural Network)
参数规模: 696,803 参数
输入规格:
输出规格:
| 依赖项 | 版本要求 | 说明 |
|---|---|---|
| Python | >= 3.10 | 推荐 3.11 |
| torch | >= 2.1.0 | PyTorch 框架 |
| torch-npu | >= 2.1.0 | 昇腾 NPU 后端 |
| safetensors | >= 0.4.0 | 模型权重加载 |
| numpy | < 2 | 数值计算 |
| 昇腾驱动 | CANN 8.0+ | 推荐 CANN 8.5.1 |
安装命令:
pip install torch-npu>=2.1.0 safetensors>=0.4.0 numpy<2# 检查 NPU 设备
npu-smi info
# 验证 torch_npu
python3 -c "import torch_npu; print(torch.npu.device_count(), torch.npu.get_device_name(0))"方式一:HuggingFace(推荐)
huggingface-cli download multimolecule/openspliceai-mane.10000 --local-dir /path/to/model方式二:AtomGit 镜像(HuggingFace 下载慢时使用)
git clone https://gitcode.com/gcw_coj3XaOd/openspliceai-mane.10000.git# 单条推理(使用默认测试序列)
python inference.py --model-path /path/to/model
# 指定 RNA 序列
python inference.py --model-path /path/to/model --sequence "AUGGCGAACCUU..."
# 从文件读取序列
python inference.py --model-path /path/to/model --sequence-file input.txt
# 批量推理测试
python inference.py --model-path /path/to/model --batch-size 4| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| --model-path | str | 必填 | 模型 checkpoint 目录路径 |
| --sequence | str | None | RNA 序列字符串 |
| --sequence-file | str | None | 包含 RNA 序列的文件路径 |
| --max-len | int | 10000 | 最大序列长度 |
| --device-id | int | 0 | NPU 设备 ID |
| --batch-size | int | 1 | 批量推理 batch size |
[INFO] Using device: Ascend910_9362
[INFO] NPU device count: 2
[INFO] Loading model from /path/to/model...
[INFO] Model loaded: 696,803 parameters
[INFO] Sequence length: 66
[INFO] Running inference on NPU...
[INFO] Inference complete in 0.261s
[INFO] Output shape: [1, 66, 3][INFO] Batch inference test (batch_size=1)...
Batch inference time: 0.267s for 1 x 500 bases
Throughput: 1872 bases/sec运行命令:
python inference.py --model-path /path/to/model输出:
================================================================
OpenSpliceAI-MANE.10000 Inference Results
================================================================
Model: multimolecule/openspliceai-mane.10000
Task: RNA splice-site prediction (3-class)
Device: Ascend910_9362
Seq length: 66
Time: 0.261s (3.9ms per base)
Parameters: 696,803
================================================================
Pos Base Pred no_splice acceptor donor
------------------------------------------------------------
0 A no_splice 1.0000 0.0000 0.0000
1 U no_splice 1.0000 0.0000 0.0000
...
49 G no_splice 1.0000 0.0000 0.0000
[SUMMARY] Prediction distribution:
no_splice : 66 (100.0%)
acceptor : 0 (0.0%)
donor : 0 (0.0%)
[STATUS] SUCCESS: Model inference on NPU completed successfully!运行命令:
python inference.py --model-path /path/to/model --batch-size 2 --max-len 500输出:
[INFO] Batch inference test (batch_size=2)...
Batch inference time: 0.312s for 2 x 500 bases
Throughput: 3205 bases/sec
Output shape: [2, 500, 3]


OpenSpliceAI 是一个经过预训练的 RNA 剪接位点预测模型。本适配工作专注于昇腾 NPU 的推理部署,模型权重从原始 checkpoint 直接加载,保持与原始实现一致的预测行为。
评测指标:
| 指标 | 结果 | 说明 |
|---|---|---|
| 模型参数量 | 696,803 | 完全匹配原始架构 |
| 序列处理长度 | <= 10000 | 模型 context window |
| NPU 推理延迟 | ~3.9ms/base | Ascend910_9362 |
| 吞吐量 | ~256 bases/sec | 单条推理 |