在昇腾 NPU(Ascend 910B)上部署 MultiMolecule 的 OpenSpliceAI(斑马鱼 variant, 2,000 nt 侧翼上下文)pre-mRNA 剪切位点预测模型(1D 扩张残差 CNN,12 层 残差块,3 级扩张),通过 torch_npu 昇腾推理引擎完成可变长 pre-mRNA 序列 → 每个核苷酸位置三分类(acceptor / donor / neither)剪切位点预测。 部署过程已完成 164 组测试用例并附全部真实输出结果。
OpenSpliceAI 是 SpliceAI(Jaganathan et al., Cell 2019)
的原生 PyTorch 模块化重实现,用于从 pre-mRNA 核苷酸序列预测 RNA 剪切位点。
MultiMolecule 团队的非官方实现 multimolecule/openspliceai-zebrafish.2000
(架构类 OpenSpliceAiForTokenPrediction)为斑马鱼(Zebrafish)物种训练,
使用 2,000 nt 侧翼上下文窗口,对每个核苷酸位置输出 3 类 logit
(acceptor / donor / neither)。
ℹ️ 模型语义:OpenSpliceAI 为 1D 扩张残差 CNN 判别式序列预测模型,输入 可变长 pre-mRNA 序列,输出每个位置的三分类剪切位点概率;不是生成式 LLM, 不存在文本生成/对话能力。
| 属性 | 值 |
|---|---|
| 模型架构 | 12 层 1D 扩张残差 CNN(3 级扩张:dilation 1/4/10,kernel 11/11/21,每级 4 块) |
| 隐藏维度 | 32 |
| 参数量 | 359,043(实测) |
| 权重文件 | model.safetensors(约 1.4MB,另含兼容的 pytorch_model.bin) |
| 输入 | 可变长 pre-mRNA 序列(RnaTokenizer 词表 A/C/G/U/N;N 视为未知/占位) |
| 输出 | (batch, seq_len, 3) logit → softmax 概率(acceptor / donor / neither) |
| 侧翼上下文 | 2,000 nt(context=2000,split evenly on both sides) |
| 推理引擎 | torch_npu(1D 扩张残差 CNN 非自回归判别式模型,vLLM-Ascend / sglang 无法托管1) |
| 许可证 | AGPL-3.0 |
openspliceai-zebrafish.2000-NPU/
├── inference.py # 推理脚本(env / predict / batch / analyze / selftest / tokenize 六种模式)
├── gen_tests.py # 164 组测试用例生成器(命令 + 真实输出 → 第 8 节内容来源)
├── generate_tests.py # 测试用例生成器(备用)
├── README.md # 本文档
├── requirements.txt # 环境依赖清单
├── venv/ # 运行环境(python3 -m venv --system-site-packages venv)
└── assets/ # 素材目录
└── .placeholder # 空占位文件| 组件 | 版本 |
|---|---|
| 操作系统 | Linux aarch64(openEuler / HCE) |
| 昇腾 NPU | Ascend 910B × 2(Ascend910_9362) |
| CANN | 8.5.1(V100R001C25SPC002B220) |
| Python | 3.11.14 |
| PyTorch | 2.9.0+cpu(昇腾本地编译,算子运行在 NPU) |
| torch_npu | 2.9.0.post1+gitee7ba04 |
| transformers | 5.9.0(multimolecule 0.2.1 依赖 transformers 5.x API) |
| multimolecule | 0.2.1(OpenSpliceAI 模型实现库) |
| danling | 0.4.4 |
| chanfig | 0.0.117 |
| torchmetrics | 1.9.0 |
| tokenizers | 0.22.2 |
| huggingface_hub | 1.28.0 |
| numpy | 1.26.4 |
| safetensors | 0.7.0 |
完整依赖见 requirements.txt。
模型权重已下载至 /data/models/multimolecule/openspliceai-zebrafish.2000
(含 config.json / model.safetensors / pytorch_model.bin / tokenizer_config.json /
vocab.txt)。
如自行下载,可参考(走 HF 镜像):
HF_ENDPOINT=https://hf-mirror.com huggingface-cli download \
multimolecule/openspliceai-zebrafish.2000 \
--local-dir /data/models/multimolecule/openspliceai-zebrafish.2000国内网络环境建议使用国内 pip 镜像与 HF 镜像2下载依赖与模型。
模型路径可用环境变量覆盖:
| 环境变量 | 默认值 | 说明 |
|---|---|---|
OPENSPLICAI_MODEL_PATH | /data/models/multimolecule/openspliceai-zebrafish.2000 | 模型目录 |
项目已提供 venv/(复用系统级 torch / torch_npu / CANN),激活后即可运行:
cd openspliceai-zebrafish.2000-NPU
source venv/bin/activate
python inference.py --mode env # 环境自检
# 如未使用 venv,直接用系统 python3 亦可(multimolecule 与 transformers 5.9.0 已就位)python3 inference.py --mode env输出示例(实测):NPU 可用、2 张 Ascend910_9362、模型权重就位、快速前向自检通过 ✅。
内置模型卡基因模板(ncRNA / mRNA / 5'UTR / 3'UTR):
python3 inference.py --mode predict --gene microRNA-21
python3 inference.py --mode predict --gene PRNP
python3 inference.py --mode predict --gene SARS内置合成序列模板(polyA/polyC/polyG/polyU/ACGU/GC50/AU50/N2000/random/random_n/iupac):
python3 inference.py --mode predict --pattern ACGU
python3 inference.py --mode predict --pattern random --seed 1
python3 inference.py --mode predict --pattern polyA直接传入 RNA 序列(可变长,自动处理):
python3 inference.py --mode predict --seq "AGCAGUCAUUAUGGCGAA"
python3 inference.py --mode predict --seq "$(python3 -c "print('ACGU'*500)")" --dtype float32 --device npu:1# 显式多序列
python3 inference.py --mode batch --seqs AUG GCG UUU ACG
# 混合序列
python3 inference.py --mode batch --seqs AGCAGUCAUUAUGGCGAA AUGCACAGCUCAGCACUG# GC 含量 0% → 100% 共 11 档
python3 inference.py --mode analyze --gc-sweep
# 碱基组成偏好(polyA / polyC / polyG / polyU)
python3 inference.py --mode analyze --base-profiles# NPU-vs-CPU 一致性
python3 inference.py --mode selftest --pattern ACGU --cpu-npu
# 跨 dtype / 跨设备一致性 + 模型信息
python3 inference.py --mode selftest --pattern ACGU --dtype-sweep --device-sweep --info
# 全部自检项
python3 inference.py --mode selftest --pattern ACGU --allpython3 inference.py --mode tokenize --seq ACGU
python3 inference.py --mode tokenize --seq RYWSKMBVDH| 参数 | 默认值 | 说明 |
|---|---|---|
--mode | predict | 运行模式:env / predict / batch / analyze / selftest / tokenize |
--seq | 无 | 待预测 RNA 序列(可变长,自动处理) |
--gene | 无 | 内置基因模板(28 个:microRNA-21/146a/155, RMRP, 7SK, TERC, vault-RNA-2-1, BC1, HIV-1-TAR, PRNP, IL10, EBOV, SARS, INS, CDKN2A, HPV16-E6, NRAS-5UTR, APP-5UTR, RUNX1-5UTR, FMR1-5UTR, MYC-5UTR, ATF4-5UTR, GPI-3UTR, NPM1-3UTR, SOD1-3UTR, HBA2-3UTR, BRAF-3UTR, H3C1-3UTR) |
--pattern | 无 | 内置合成模板(polyA/polyC/polyG/polyU/ACGU/GC50/AU50/N2000/random/random_n/iupac) |
--name | 无 | 序列展示标签 |
--dtype | float32 | 推理精度:float32(推荐) / bfloat16 / float16 |
--device | npu:0 | 推理设备(npu:0 / npu:1 / cpu) |
--seed | 42 | 随机种子(random / random_n / iupac 模板) |
--seqs | 无 | 批量预测多序列 |
--seq-file | 无 | 批量预测序列文件 |
--max-seqs | 无 | 仅取前 N 个序列 |
--gc-sweep / --base-profiles | False | analyze 模式分析类型 |
--cpu-npu / --dtype-sweep / --device-sweep / --info / --all | False | selftest 模式检查项 |
--compact | True | 紧凑输出格式 |
--verbose | False | 详细输出 |
| 序列 | 长度 | n_acceptor | n_donor | mean_acc | max_acc | max_don |
|---|---|---|---|---|---|---|
| ACGU 重复(CpG 周期) | 2000 | 0 | 0 | 0.0001 | 0.0029 | 0.0556 |
| polyA(A×2000) | 2000 | 0 | 0 | 0.0000 | 0.0000 | 0.0000 |
| polyC(C×2000) | 2000 | 0 | 0 | 0.0002 | 0.0128 | 0.0000 |
| polyG(G×2000) | 2000 | 0 | 0 | 0.0060 | 0.2800 | 0.0000 |
| polyU(U×2000) | 2000 | 0 | 0 | 0.0002 | 0.0008 | 0.0000 |
| 全 N(未知碱基占位) | 2000 | 0 | 0 | 0.0000 | 0.0000 | 0.0000 |
| 随机 DNA(seed=42) | 2000 | 0 | 0 | 0.0000 | 0.0002 | 0.0002 |
| 真基因 microRNA-21 | 22 | 0 | 0 | 0.0001 | 0.0006 | 0.0000 |
| 真基因 SARS | 382 | 0 | 0 | 0.0001 | 0.0006 | 0.0000 |
| 真基因 INS | 333 | 0 | 0 | 0.0001 | 0.0004 | 0.0000 |
| 真基因 CDKN2A | 480 | 0 | 0 | 0.0001 | 0.0005 | 0.0000 |
以 28 个基因模板为例,完整推理输出如下:
$ python3 inference.py --mode predict --gene microRNA-21
[predict] seq=microRNA-21 输入=(1,22) 设备=npu:0 精度=float32 耗时=0.004s n_acceptor=0 n_donor=0 n_neither=22 mean_acc=0.0001 mean_don=0.0000 max_acc=0.0006 max_don=0.0000 top5_acc=3@0.0006,11@0.0001,8@0.0001,2@0.0001,4@0.0001以 ACGU 合成模板为例:
$ python3 inference.py --mode predict --pattern ACGU
[predict] seq=ACGU 输入=(1,2000) 设备=npu:0 精度=float32 耗时=0.004s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0001 mean_don=0.0003 max_acc=0.0029 max_don=0.0556 top5_acc=1982@0.0029,1970@0.0028,1974@0.0027,1978@0.0026,1986@0.0026输出说明:
n_acceptor / n_donor / n_neither:每个位置预测为剪接受体/供体/非剪接位点的数量(argmax 判定)。mean_acc / mean_don:所有位置 acceptor/donor 概率的均值。max_acc / max_don:所有位置 acceptor/donor 概率的最大值。top5_acc:概率最高的 5 个 acceptor 位置(<position>@<probability>)。全部用例在昇腾 NPU(Ascend 910B)实测执行,命令与输出一一对应。 按 7 大类别组织:A 环境自检(3)、B 真基因单序列预测(69)、C 合成/随机序列预测(47)、 D 批量预测(7)、E 序列组成分析(4)、F 一致性自检(17)、G 边界与 Tokenizer(17), 共 164 组 ≥ 148 组。
| 类别 | 编号 | 说明 | 数量 |
|---|---|---|---|
| A | 001–003 | 环境自检(双卡 / 指定可见卡) | 3 |
| B | 004–072 | 真基因单序列预测(28 基因 × 2 dtypes + 13 基因 × npu:1) | 69 |
| C | 073–119 | 合成/随机序列预测(模板 / 随机种子 / 含 N / IUPAC) | 47 |
| D | 120–126 | 批量预测(批量大小 / 混合组成) | 7 |
| E | 127–130 | 序列组成分析(GC 梯度 / 碱基偏好 / 跨精度) | 4 |
| F | 131–147 | 一致性自检(NPU-CPU / 跨 dtype / 跨设备 / 模型信息) | 17 |
| G | 148–164 | 边界、Tokenizer 与错误处理 | 17 |
163 组全部用例的实际命令与 NPU 实测输出如下:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
输出:
| A | 001–003 | A 环境自检(3) | 3 |
python3 inference.py --mode env输出:
[env] python=3.11.14 torch=2.9.0+cpu torch_npu=2.9.0.post1+gitee7ba04 transformers=5.9.0 multimolecule=0.2.1 numpy=1.26.4 NPU可用=True 设备数=2 设备0=Ascend910_9362 权重OK=True 前向OK=TrueASCEND_RT_VISIBLE_DEVICES=0 python3 inference.py --mode env输出:
[env] python=3.11.14 torch=2.9.0+cpu torch_npu=2.9.0.post1+gitee7ba04 transformers=5.9.0 multimolecule=0.2.1 numpy=1.26.4 NPU可用=True 设备数=2 设备0=Ascend910_9362 权重OK=True 前向OK=TrueASCEND_RT_VISIBLE_DEVICES=1 python3 inference.py --mode env输出:
[env] python=3.11.14 torch=2.9.0+cpu torch_npu=2.9.0.post1+gitee7ba04 transformers=5.9.0 multimolecule=0.2.1 numpy=1.26.4 NPU可用=True 设备数=2 设备0=Ascend910_9362 权重OK=True 前向OK=True| B | 004–072 | B 真基因单序列预测(69) | 69 |
python3 inference.py --mode predict --gene microRNA-21输出:
[predict] seq=microRNA-21 输入=(1,22) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=22 mean_acc=0.0001 mean_don=0.0000 max_acc=0.0006 max_don=0.0000 top5_acc=3@0.0006,11@0.0001,8@0.0001,2@0.0001,4@0.0001python3 inference.py --mode predict --gene microRNA-21 --dtype bfloat16输出:
[predict] seq=microRNA-21 输入=(1,22) 设备=npu:0 精度=bfloat16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=22 mean_acc=0.0001 mean_don=0.0000 max_acc=0.0006 max_don=0.0000 top5_acc=3@0.0006,11@0.0001,8@0.0001,2@0.0001,4@0.0001python3 inference.py --mode predict --gene microRNA-146a输出:
[predict] seq=microRNA-146a 输入=(1,22) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=22 mean_acc=0.0001 mean_don=0.0000 max_acc=0.0001 max_don=0.0002 top5_acc=2@0.0001,4@0.0001,5@0.0001,6@0.0001,18@0.0001python3 inference.py --mode predict --gene microRNA-146a --dtype bfloat16输出:
[predict] seq=microRNA-146a 输入=(1,22) 设备=npu:0 精度=bfloat16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=22 mean_acc=0.0001 mean_don=0.0000 max_acc=0.0001 max_don=0.0002 top5_acc=2@0.0001,4@0.0001,5@0.0001,18@0.0001,6@0.0001python3 inference.py --mode predict --gene microRNA-155输出:
[predict] seq=microRNA-155 输入=(1,24) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=24 mean_acc=0.0001 mean_don=0.0000 max_acc=0.0004 max_don=0.0001 top5_acc=19@0.0004,5@0.0001,6@0.0001,3@0.0001,0@0.0000python3 inference.py --mode predict --gene microRNA-155 --dtype bfloat16输出:
[predict] seq=microRNA-155 输入=(1,24) 设备=npu:0 精度=bfloat16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=24 mean_acc=0.0001 mean_don=0.0000 max_acc=0.0004 max_don=0.0001 top5_acc=19@0.0004,5@0.0001,6@0.0001,3@0.0001,0@0.0000python3 inference.py --mode predict --gene RMRP输出:
[predict] seq=RMRP 输入=(1,277) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=277 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0013 max_don=0.0016 top5_acc=67@0.0013,259@0.0005,1@0.0003,208@0.0002,0@0.0001python3 inference.py --mode predict --gene RMRP --dtype bfloat16输出:
[predict] seq=RMRP 输入=(1,277) 设备=npu:0 精度=bfloat16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=277 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0013 max_don=0.0016 top5_acc=67@0.0013,259@0.0005,1@0.0003,208@0.0002,0@0.0001python3 inference.py --mode predict --gene 7SK输出:
[predict] seq=7SK 输入=(1,332) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=332 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0008 max_don=0.0018 top5_acc=188@0.0008,302@0.0003,201@0.0003,318@0.0002,78@0.0002python3 inference.py --mode predict --gene 7SK --dtype bfloat16输出:
[predict] seq=7SK 输入=(1,332) 设备=npu:0 精度=bfloat16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=332 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0008 max_don=0.0018 top5_acc=188@0.0008,201@0.0003,302@0.0003,318@0.0002,78@0.0002python3 inference.py --mode predict --gene TERC输出:
[predict] seq=TERC 输入=(1,451) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=451 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0007 max_don=0.0011 top5_acc=433@0.0007,11@0.0003,447@0.0002,445@0.0002,369@0.0002python3 inference.py --mode predict --gene TERC --dtype bfloat16输出:
[predict] seq=TERC 输入=(1,451) 设备=npu:0 精度=bfloat16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=451 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0007 max_don=0.0012 top5_acc=433@0.0007,11@0.0002,447@0.0002,445@0.0002,1@0.0002python3 inference.py --mode predict --gene vault-RNA-2-1输出:
[predict] seq=vault-RNA-2-1 输入=(1,108) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=108 mean_acc=0.0001 mean_don=0.0001 max_acc=0.0017 max_don=0.0013 top5_acc=76@0.0017,92@0.0008,81@0.0007,94@0.0006,90@0.0006python3 inference.py --mode predict --gene vault-RNA-2-1 --dtype bfloat16输出:
[predict] seq=vault-RNA-2-1 输入=(1,108) 设备=npu:0 精度=bfloat16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=108 mean_acc=0.0001 mean_don=0.0001 max_acc=0.0017 max_don=0.0013 top5_acc=76@0.0017,92@0.0008,81@0.0007,90@0.0006,94@0.0006python3 inference.py --mode predict --gene BC1输出:
[predict] seq=BC1 输入=(1,200) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=200 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0004 max_don=0.0004 top5_acc=179@0.0004,162@0.0001,186@0.0001,41@0.0001,185@0.0001python3 inference.py --mode predict --gene BC1 --dtype bfloat16输出:
[predict] seq=BC1 输入=(1,200) 设备=npu:0 精度=bfloat16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=200 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0004 max_don=0.0004 top5_acc=179@0.0004,162@0.0001,186@0.0001,41@0.0001,185@0.0001python3 inference.py --mode predict --gene HIV-1-TAR输出:
[predict] seq=HIV-1-TAR 输入=(1,57) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=57 mean_acc=0.0001 mean_don=0.0001 max_acc=0.0031 max_don=0.0004 top5_acc=51@0.0031,1@0.0011,15@0.0005,0@0.0004,2@0.0003python3 inference.py --mode predict --gene HIV-1-TAR --dtype bfloat16输出:
[predict] seq=HIV-1-TAR 输入=(1,57) 设备=npu:0 精度=bfloat16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=57 mean_acc=0.0001 mean_don=0.0001 max_acc=0.0031 max_don=0.0005 top5_acc=51@0.0031,1@0.0011,15@0.0005,0@0.0004,2@0.0003python3 inference.py --mode predict --gene PRNP输出:
[predict] seq=PRNP 输入=(1,66) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=66 mean_acc=0.0001 mean_don=0.0000 max_acc=0.0004 max_don=0.0002 top5_acc=50@0.0004,0@0.0003,48@0.0002,44@0.0001,4@0.0001python3 inference.py --mode predict --gene PRNP --dtype bfloat16输出:
[predict] seq=PRNP 输入=(1,66) 设备=npu:0 精度=bfloat16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=66 mean_acc=0.0001 mean_don=0.0000 max_acc=0.0004 max_don=0.0002 top5_acc=50@0.0004,0@0.0003,48@0.0002,44@0.0001,4@0.0001python3 inference.py --mode predict --gene IL10输出:
[predict] seq=IL10 输入=(1,54) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=54 mean_acc=0.0003 mean_don=0.0002 max_acc=0.0042 max_don=0.0038 top5_acc=50@0.0042,51@0.0016,8@0.0007,45@0.0007,44@0.0006python3 inference.py --mode predict --gene IL10 --dtype bfloat16输出:
[predict] seq=IL10 输入=(1,54) 设备=npu:0 精度=bfloat16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=54 mean_acc=0.0003 mean_don=0.0002 max_acc=0.0043 max_don=0.0037 top5_acc=50@0.0043,51@0.0016,8@0.0007,45@0.0007,44@0.0007python3 inference.py --mode predict --gene EBOV输出:
[predict] seq=EBOV 输入=(1,306) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=306 mean_acc=0.0001 mean_don=0.0000 max_acc=0.0030 max_don=0.0015 top5_acc=300@0.0030,157@0.0007,112@0.0005,147@0.0005,264@0.0004python3 inference.py --mode predict --gene EBOV --dtype bfloat16输出:
[predict] seq=EBOV 输入=(1,306) 设备=npu:0 精度=bfloat16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=306 mean_acc=0.0001 mean_don=0.0000 max_acc=0.0030 max_don=0.0015 top5_acc=300@0.0030,157@0.0007,112@0.0005,147@0.0005,264@0.0005python3 inference.py --mode predict --gene SARS输出:
[predict] seq=SARS 输入=(1,495) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=495 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0035 max_don=0.0007 top5_acc=202@0.0035,35@0.0007,277@0.0005,97@0.0004,41@0.0003python3 inference.py --mode predict --gene SARS --dtype bfloat16输出:
[predict] seq=SARS 输入=(1,495) 设备=npu:0 精度=bfloat16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=495 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0034 max_don=0.0007 top5_acc=202@0.0034,35@0.0006,277@0.0005,97@0.0004,41@0.0003python3 inference.py --mode predict --gene INS输出:
[predict] seq=INS 输入=(1,333) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=333 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0006 max_don=0.0019 top5_acc=312@0.0006,293@0.0005,318@0.0003,261@0.0002,326@0.0001python3 inference.py --mode predict --gene INS --dtype bfloat16输出:
[predict] seq=INS 输入=(1,333) 设备=npu:0 精度=bfloat16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=333 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0006 max_don=0.0018 top5_acc=312@0.0006,293@0.0005,318@0.0002,261@0.0002,112@0.0001python3 inference.py --mode predict --gene CDKN2A输出:
[predict] seq=CDKN2A 输入=(1,471) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=471 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0021 max_don=0.0007 top5_acc=448@0.0021,436@0.0019,457@0.0015,459@0.0004,445@0.0002python3 inference.py --mode predict --gene CDKN2A --dtype bfloat16输出:
[predict] seq=CDKN2A 输入=(1,471) 设备=npu:0 精度=bfloat16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=471 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0020 max_don=0.0007 top5_acc=448@0.0020,436@0.0020,457@0.0015,459@0.0004,445@0.0002python3 inference.py --mode predict --gene HPV16-E6输出:
[predict] seq=HPV16-E6 输入=(1,477) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=1 n_donor=0 n_neither=476 mean_acc=0.0013 mean_don=0.0003 max_acc=0.5902 max_don=0.0468 top5_acc=326@0.5902,443@0.0108,345@0.0008,323@0.0005,106@0.0005python3 inference.py --mode predict --gene HPV16-E6 --dtype bfloat16输出:
[predict] seq=HPV16-E6 输入=(1,477) 设备=npu:0 精度=bfloat16 耗时=0.000s n_acceptor=1 n_donor=0 n_neither=476 mean_acc=0.0013 mean_don=0.0003 max_acc=0.5898 max_don=0.0449 top5_acc=326@0.5898,443@0.0109,345@0.0008,106@0.0005,323@0.0005python3 inference.py --mode predict --gene NRAS-5UTR输出:
[predict] seq=NRAS-5UTR 输入=(1,131) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=131 mean_acc=0.0001 mean_don=0.0001 max_acc=0.0025 max_don=0.0034 top5_acc=114@0.0025,108@0.0011,124@0.0011,123@0.0011,125@0.0009python3 inference.py --mode predict --gene NRAS-5UTR --dtype bfloat16输出:
[predict] seq=NRAS-5UTR 输入=(1,131) 设备=npu:0 精度=bfloat16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=131 mean_acc=0.0001 mean_don=0.0001 max_acc=0.0024 max_don=0.0035 top5_acc=114@0.0024,108@0.0011,124@0.0011,123@0.0011,125@0.0009python3 inference.py --mode predict --gene APP-5UTR输出:
[predict] seq=APP-5UTR 输入=(1,150) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=150 mean_acc=0.0001 mean_don=0.0001 max_acc=0.0059 max_don=0.0026 top5_acc=143@0.0059,5@0.0006,149@0.0005,141@0.0003,144@0.0003python3 inference.py --mode predict --gene APP-5UTR --dtype bfloat16输出:
[predict] seq=APP-5UTR 输入=(1,150) 设备=npu:0 精度=bfloat16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=150 mean_acc=0.0001 mean_don=0.0001 max_acc=0.0060 max_don=0.0027 top5_acc=143@0.0060,5@0.0005,149@0.0005,141@0.0003,144@0.0003python3 inference.py --mode predict --gene RUNX1-5UTR输出:
[predict] seq=RUNX1-5UTR 输入=(1,194) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=194 mean_acc=0.0000 mean_don=0.0001 max_acc=0.0013 max_don=0.0009 top5_acc=185@0.0013,121@0.0012,188@0.0005,167@0.0004,170@0.0003python3 inference.py --mode predict --gene RUNX1-5UTR --dtype bfloat16输出:
[predict] seq=RUNX1-5UTR 输入=(1,194) 设备=npu:0 精度=bfloat16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=194 mean_acc=0.0000 mean_don=0.0001 max_acc=0.0012 max_don=0.0009 top5_acc=185@0.0012,121@0.0012,188@0.0005,167@0.0004,170@0.0003python3 inference.py --mode predict --gene FMR1-5UTR输出:
[predict] seq=FMR1-5UTR 输入=(1,261) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=261 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0005 max_don=0.0004 top5_acc=248@0.0005,213@0.0003,245@0.0003,258@0.0002,5@0.0002python3 inference.py --mode predict --gene FMR1-5UTR --dtype bfloat16输出:
[predict] seq=FMR1-5UTR 输入=(1,261) 设备=npu:0 精度=bfloat16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=261 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0005 max_don=0.0004 top5_acc=248@0.0005,213@0.0003,245@0.0003,258@0.0002,256@0.0002python3 inference.py --mode predict --gene MYC-5UTR输出:
[predict] seq=MYC-5UTR 输入=(1,363) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=363 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0013 max_don=0.0002 top5_acc=352@0.0013,339@0.0004,360@0.0003,321@0.0002,346@0.0002python3 inference.py --mode predict --gene MYC-5UTR --dtype bfloat16输出:
[predict] seq=MYC-5UTR 输入=(1,363) 设备=npu:0 精度=bfloat16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=363 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0013 max_don=0.0002 top5_acc=352@0.0013,339@0.0004,360@0.0003,321@0.0002,346@0.0002python3 inference.py --mode predict --gene ATF4-5UTR输出:
[predict] seq=ATF4-5UTR 输入=(1,282) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=282 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0005 max_don=0.0005 top5_acc=268@0.0005,72@0.0003,134@0.0002,234@0.0002,250@0.0001python3 inference.py --mode predict --gene ATF4-5UTR --dtype bfloat16输出:
[predict] seq=ATF4-5UTR 输入=(1,282) 设备=npu:0 精度=bfloat16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=282 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0005 max_don=0.0005 top5_acc=268@0.0005,72@0.0003,134@0.0002,234@0.0002,250@0.0001python3 inference.py --mode predict --gene GPI-3UTR输出:
[predict] seq=GPI-3UTR 输入=(1,300) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=300 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0007 max_don=0.0040 top5_acc=262@0.0007,276@0.0006,234@0.0006,119@0.0003,198@0.0003python3 inference.py --mode predict --gene GPI-3UTR --dtype bfloat16输出:
[predict] seq=GPI-3UTR 输入=(1,300) 设备=npu:0 精度=bfloat16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=300 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0007 max_don=0.0040 top5_acc=262@0.0007,276@0.0006,234@0.0005,198@0.0003,119@0.0003python3 inference.py --mode predict --gene NPM1-3UTR输出:
[predict] seq=NPM1-3UTR 输入=(1,335) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=335 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0022 max_don=0.0011 top5_acc=89@0.0022,58@0.0008,130@0.0006,171@0.0004,180@0.0003python3 inference.py --mode predict --gene NPM1-3UTR --dtype bfloat16输出:
[predict] seq=NPM1-3UTR 输入=(1,335) 设备=npu:0 精度=bfloat16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=335 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0022 max_don=0.0011 top5_acc=89@0.0022,58@0.0008,130@0.0006,171@0.0004,180@0.0003python3 inference.py --mode predict --gene SOD1-3UTR输出:
[predict] seq=SOD1-3UTR 输入=(1,353) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=353 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0005 max_don=0.0085 top5_acc=122@0.0005,53@0.0005,198@0.0003,234@0.0002,59@0.0002python3 inference.py --mode predict --gene SOD1-3UTR --dtype bfloat16输出:
[predict] seq=SOD1-3UTR 输入=(1,353) 设备=npu:0 精度=bfloat16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=353 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0005 max_don=0.0084 top5_acc=53@0.0005,122@0.0005,198@0.0003,234@0.0002,59@0.0002python3 inference.py --mode predict --gene HBA2-3UTR输出:
[predict] seq=HBA2-3UTR 输入=(1,109) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=109 mean_acc=0.0001 mean_don=0.0001 max_acc=0.0041 max_don=0.0009 top5_acc=94@0.0041,100@0.0018,107@0.0016,103@0.0008,101@0.0003python3 inference.py --mode predict --gene HBA2-3UTR --dtype bfloat16输出:
[predict] seq=HBA2-3UTR 输入=(1,109) 设备=npu:0 精度=bfloat16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=109 mean_acc=0.0001 mean_don=0.0001 max_acc=0.0041 max_don=0.0010 top5_acc=94@0.0041,100@0.0018,107@0.0016,103@0.0008,101@0.0003python3 inference.py --mode predict --gene BRAF-3UTR输出:
[predict] seq=BRAF-3UTR 输入=(1,419) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=419 mean_acc=0.0001 mean_don=0.0001 max_acc=0.0182 max_don=0.0082 top5_acc=390@0.0182,332@0.0086,105@0.0018,398@0.0009,413@0.0007python3 inference.py --mode predict --gene BRAF-3UTR --dtype bfloat16输出:
[predict] seq=BRAF-3UTR 输入=(1,419) 设备=npu:0 精度=bfloat16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=419 mean_acc=0.0001 mean_don=0.0001 max_acc=0.0183 max_don=0.0082 top5_acc=390@0.0183,332@0.0084,105@0.0018,398@0.0009,413@0.0007python3 inference.py --mode predict --gene H3C1-3UTR输出:
[predict] seq=H3C1-3UTR 输入=(1,58) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=58 mean_acc=0.0001 mean_don=0.0000 max_acc=0.0007 max_don=0.0002 top5_acc=4@0.0007,5@0.0006,43@0.0005,6@0.0005,2@0.0004python3 inference.py --mode predict --gene H3C1-3UTR --dtype bfloat16输出:
[predict] seq=H3C1-3UTR 输入=(1,58) 设备=npu:0 精度=bfloat16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=58 mean_acc=0.0001 mean_don=0.0000 max_acc=0.0007 max_don=0.0002 top5_acc=4@0.0007,5@0.0007,43@0.0005,6@0.0005,2@0.0004python3 inference.py --mode predict --gene microRNA-21 --device npu:1输出:
[predict] seq=microRNA-21 输入=(1,22) 设备=npu:1 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=22 mean_acc=0.0001 mean_don=0.0000 max_acc=0.0006 max_don=0.0000 top5_acc=3@0.0006,11@0.0001,8@0.0001,2@0.0001,4@0.0001python3 inference.py --mode predict --gene microRNA-146a --device npu:1输出:
[predict] seq=microRNA-146a 输入=(1,22) 设备=npu:1 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=22 mean_acc=0.0001 mean_don=0.0000 max_acc=0.0001 max_don=0.0002 top5_acc=2@0.0001,4@0.0001,5@0.0001,6@0.0001,18@0.0001python3 inference.py --mode predict --gene microRNA-155 --device npu:1输出:
[predict] seq=microRNA-155 输入=(1,24) 设备=npu:1 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=24 mean_acc=0.0001 mean_don=0.0000 max_acc=0.0004 max_don=0.0001 top5_acc=19@0.0004,5@0.0001,6@0.0001,3@0.0001,0@0.0000python3 inference.py --mode predict --gene RMRP --device npu:1输出:
[predict] seq=RMRP 输入=(1,277) 设备=npu:1 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=277 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0013 max_don=0.0016 top5_acc=67@0.0013,259@0.0005,1@0.0003,208@0.0002,0@0.0001python3 inference.py --mode predict --gene 7SK --device npu:1输出:
[predict] seq=7SK 输入=(1,332) 设备=npu:1 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=332 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0008 max_don=0.0018 top5_acc=188@0.0008,302@0.0003,201@0.0003,318@0.0002,78@0.0002python3 inference.py --mode predict --gene TERC --device npu:1输出:
[predict] seq=TERC 输入=(1,451) 设备=npu:1 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=451 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0007 max_don=0.0012 top5_acc=433@0.0007,11@0.0003,447@0.0002,445@0.0002,1@0.0002python3 inference.py --mode predict --gene vault-RNA-2-1 --device npu:1输出:
[predict] seq=vault-RNA-2-1 输入=(1,108) 设备=npu:1 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=108 mean_acc=0.0001 mean_don=0.0001 max_acc=0.0017 max_don=0.0013 top5_acc=76@0.0017,92@0.0008,81@0.0007,94@0.0007,90@0.0006python3 inference.py --mode predict --gene BC1 --device npu:1输出:
[predict] seq=BC1 输入=(1,200) 设备=npu:1 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=200 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0004 max_don=0.0004 top5_acc=179@0.0004,186@0.0001,162@0.0001,41@0.0001,185@0.0001python3 inference.py --mode predict --gene HIV-1-TAR --device npu:1输出:
[predict] seq=HIV-1-TAR 输入=(1,57) 设备=npu:1 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=57 mean_acc=0.0001 mean_don=0.0001 max_acc=0.0031 max_don=0.0005 top5_acc=51@0.0031,1@0.0011,15@0.0005,0@0.0004,2@0.0003python3 inference.py --mode predict --gene PRNP --device npu:1输出:
[predict] seq=PRNP 输入=(1,66) 设备=npu:1 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=66 mean_acc=0.0001 mean_don=0.0000 max_acc=0.0004 max_don=0.0002 top5_acc=50@0.0004,0@0.0003,48@0.0002,44@0.0001,4@0.0001python3 inference.py --mode predict --gene IL10 --device npu:1输出:
[predict] seq=IL10 输入=(1,54) 设备=npu:1 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=54 mean_acc=0.0003 mean_don=0.0002 max_acc=0.0043 max_don=0.0038 top5_acc=50@0.0043,51@0.0016,8@0.0007,45@0.0007,44@0.0006python3 inference.py --mode predict --gene EBOV --device npu:1输出:
[predict] seq=EBOV 输入=(1,306) 设备=npu:1 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=306 mean_acc=0.0001 mean_don=0.0000 max_acc=0.0031 max_don=0.0015 top5_acc=300@0.0031,157@0.0007,112@0.0006,147@0.0005,264@0.0004python3 inference.py --mode predict --gene SARS --device npu:1输出:
[predict] seq=SARS 输入=(1,495) 设备=npu:1 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=495 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0036 max_don=0.0007 top5_acc=202@0.0036,35@0.0007,277@0.0005,97@0.0004,41@0.0003| C | 073–118 | C 合成/随机序列预测(46) | 46 |
python3 inference.py --mode predict --pattern polyA输出:
[predict] seq=polyA 输入=(1,2000) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0002 max_don=0.0008 top5_acc=1990@0.0002,1982@0.0002,1983@0.0002,1986@0.0002,1985@0.0002python3 inference.py --mode predict --pattern polyA --dtype bfloat16输出:
[predict] seq=polyA 输入=(1,2000) 设备=npu:0 精度=bfloat16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0002 max_don=0.0008 top5_acc=1990@0.0002,1983@0.0002,1984@0.0002,1989@0.0002,1986@0.0002python3 inference.py --mode predict --pattern polyC输出:
[predict] seq=polyC 输入=(1,2000) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0002 mean_don=0.0000 max_acc=0.0073 max_don=0.0014 top5_acc=1968@0.0073,1964@0.0070,1962@0.0070,1966@0.0070,1965@0.0068python3 inference.py --mode predict --pattern polyC --dtype bfloat16输出:
[predict] seq=polyC 输入=(1,2000) 设备=npu:0 精度=bfloat16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0002 mean_don=0.0000 max_acc=0.0078 max_don=0.0013 top5_acc=1968@0.0078,1964@0.0071,1971@0.0070,1969@0.0069,1960@0.0069python3 inference.py --mode predict --pattern polyG输出:
[predict] seq=polyG 输入=(1,2000) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0062 mean_don=0.0001 max_acc=0.1868 max_don=0.0060 top5_acc=1964@0.1868,1960@0.1838,1961@0.1815,1963@0.1814,1965@0.1810python3 inference.py --mode predict --pattern polyG --dtype bfloat16输出:
[predict] seq=polyG 输入=(1,2000) 设备=npu:0 精度=bfloat16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0063 mean_don=0.0001 max_acc=0.1924 max_don=0.0059 top5_acc=1961@0.1924,1964@0.1924,1962@0.1875,1963@0.1875,1968@0.1875python3 inference.py --mode predict --pattern polyU输出:
[predict] seq=polyU 输入=(1,2000) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0002 mean_don=0.0000 max_acc=0.0051 max_don=0.0005 top5_acc=1974@0.0051,1973@0.0051,1971@0.0051,1981@0.0050,1970@0.0050python3 inference.py --mode predict --pattern polyU --dtype bfloat16输出:
[predict] seq=polyU 输入=(1,2000) 设备=npu:0 精度=bfloat16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0002 mean_don=0.0000 max_acc=0.0053 max_don=0.0005 top5_acc=1970@0.0053,1973@0.0053,1974@0.0053,1981@0.0052,1982@0.0051python3 inference.py --mode predict --pattern ACGU输出:
[predict] seq=ACGU 输入=(1,2000) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0001 mean_don=0.0003 max_acc=0.0029 max_don=0.0552 top5_acc=1982@0.0029,1970@0.0028,1974@0.0027,1978@0.0026,1986@0.0025python3 inference.py --mode predict --pattern ACGU --dtype bfloat16输出:
[predict] seq=ACGU 输入=(1,2000) 设备=npu:0 精度=bfloat16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0001 mean_don=0.0003 max_acc=0.0030 max_don=0.0537 top5_acc=1982@0.0030,1970@0.0029,1974@0.0027,1978@0.0027,1986@0.0025python3 inference.py --mode predict --pattern GC50输出:
[predict] seq=GC50 输入=(1,2000) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0005 mean_don=0.0000 max_acc=0.0159 max_don=0.0015 top5_acc=1970@0.0159,1972@0.0158,1974@0.0155,1966@0.0153,1964@0.0151python3 inference.py --mode predict --pattern GC50 --dtype bfloat16输出:
[predict] seq=GC50 输入=(1,2000) 设备=npu:0 精度=bfloat16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0005 mean_don=0.0000 max_acc=0.0161 max_don=0.0016 top5_acc=1972@0.0161,1966@0.0154,1970@0.0154,1964@0.0154,1974@0.0152python3 inference.py --mode predict --pattern AU50输出:
[predict] seq=AU50 输入=(1,2000) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0003 mean_don=0.0001 max_acc=0.0163 max_don=0.0020 top5_acc=1984@0.0163,1990@0.0159,1986@0.0157,1982@0.0157,1988@0.0156python3 inference.py --mode predict --pattern AU50 --dtype bfloat16输出:
[predict] seq=AU50 输入=(1,2000) 设备=npu:0 精度=bfloat16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0003 mean_don=0.0001 max_acc=0.0175 max_don=0.0021 top5_acc=1984@0.0175,1986@0.0164,1982@0.0164,1990@0.0159,1980@0.0154python3 inference.py --mode predict --pattern N2000输出:
[predict] seq=N2000 输入=(1,2000) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.2784 mean_don=0.2861 max_acc=0.2784 max_don=0.2861 top5_acc=1999@0.2784,670@0.2784,657@0.2784,658@0.2784,659@0.2784python3 inference.py --mode predict --pattern N2000 --dtype bfloat16输出:
[predict] seq=N2000 输入=(1,2000) 设备=npu:0 精度=bfloat16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.2793 mean_don=0.2871 max_acc=0.2793 max_don=0.2871 top5_acc=1999@0.2793,670@0.2793,657@0.2793,658@0.2793,659@0.2793python3 inference.py --mode predict --pattern random --seed 1输出:
[predict] seq=random_s1 输入=(1,2000) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0000 mean_don=0.0002 max_acc=0.0107 max_don=0.3449 top5_acc=1990@0.0107,1955@0.0045,1916@0.0011,1972@0.0010,1928@0.0009python3 inference.py --mode predict --pattern random --seed 2输出:
[predict] seq=random_s2 输入=(1,2000) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=1 n_neither=1999 mean_acc=0.0000 mean_don=0.0005 max_acc=0.0093 max_don=0.9595 top5_acc=1997@0.0093,1975@0.0035,1937@0.0017,1992@0.0012,1998@0.0009python3 inference.py --mode predict --pattern random --seed 3输出:
[predict] seq=random_s3 输入=(1,2000) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0011 max_don=0.0138 top5_acc=1946@0.0011,1990@0.0008,1838@0.0007,1878@0.0007,1851@0.0006python3 inference.py --mode predict --pattern random --seed 4输出:
[predict] seq=random_s4 输入=(1,2000) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0000 mean_don=0.0001 max_acc=0.0068 max_don=0.1227 top5_acc=1971@0.0068,1998@0.0028,1952@0.0023,1984@0.0009,1987@0.0008python3 inference.py --mode predict --pattern random --seed 5输出:
[predict] seq=random_s5 输入=(1,2000) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0029 max_don=0.0022 top5_acc=1975@0.0029,1996@0.0017,1936@0.0015,1912@0.0012,1991@0.0009python3 inference.py --mode predict --pattern random --seed 6输出:
[predict] seq=random_s6 输入=(1,2000) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0000 mean_don=0.0001 max_acc=0.0290 max_don=0.1025 top5_acc=1994@0.0290,1939@0.0015,1921@0.0009,1950@0.0008,1876@0.0007python3 inference.py --mode predict --pattern random --seed 7输出:
[predict] seq=random_s7 输入=(1,2000) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0000 mean_don=0.0001 max_acc=0.0122 max_don=0.1689 top5_acc=1980@0.0122,871@0.0061,1871@0.0034,1857@0.0028,1940@0.0025python3 inference.py --mode predict --pattern random --seed 8输出:
[predict] seq=random_s8 输入=(1,2000) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=1 n_neither=1999 mean_acc=0.0000 mean_don=0.0004 max_acc=0.0243 max_don=0.7796 top5_acc=1986@0.0243,1952@0.0084,1977@0.0013,1822@0.0013,1973@0.0012python3 inference.py --mode predict --pattern random --seed 9输出:
[predict] seq=random_s9 输入=(1,2000) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=1 n_donor=1 n_neither=1998 mean_acc=0.0005 mean_don=0.0008 max_acc=0.8955 max_don=0.9848 top5_acc=261@0.8955,1960@0.0016,1975@0.0016,1946@0.0012,1966@0.0012python3 inference.py --mode predict --pattern random --seed 10输出:
[predict] seq=random_s10 输入=(1,2000) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0000 mean_don=0.0001 max_acc=0.0024 max_don=0.0578 top5_acc=1971@0.0024,1940@0.0016,1992@0.0014,1988@0.0008,1991@0.0008python3 inference.py --mode predict --pattern random_n --seed 11输出:
[predict] seq=random_n_s11 输入=(1,2000) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0152 mean_don=0.0157 max_acc=0.2784 max_don=0.2861 top5_acc=1805@0.2784,747@0.2784,157@0.2784,148@0.2784,121@0.2784python3 inference.py --mode predict --pattern random_n --seed 12输出:
[predict] seq=random_n_s12 输入=(1,2000) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0134 mean_don=0.0138 max_acc=0.2784 max_don=0.2861 top5_acc=768@0.2784,1928@0.2784,1124@0.2784,1104@0.2784,1097@0.2784python3 inference.py --mode predict --pattern random_n --seed 13输出:
[predict] seq=random_n_s13 输入=(1,2000) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0128 mean_don=0.0132 max_acc=0.2784 max_don=0.2861 top5_acc=1877@0.2784,1035@0.2784,739@0.2784,787@0.2784,802@0.2784python3 inference.py --mode predict --pattern random_n --seed 14输出:
[predict] seq=random_n_s14 输入=(1,2000) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=1 n_donor=0 n_neither=1999 mean_acc=0.0150 mean_don=0.0151 max_acc=0.6474 max_don=0.2861 top5_acc=1935@0.6474,953@0.2784,1003@0.2784,1184@0.2784,1166@0.2784python3 inference.py --mode predict --pattern random_n --seed 15输出:
[predict] seq=random_n_s15 输入=(1,2000) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0167 mean_don=0.0172 max_acc=0.2784 max_don=0.2861 top5_acc=0@0.2784,1243@0.2784,1131@0.2784,1138@0.2784,1143@0.2784python3 inference.py --mode predict --pattern random_n --seed 16输出:
[predict] seq=random_n_s16 输入=(1,2000) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0160 mean_don=0.0165 max_acc=0.2784 max_don=0.2861 top5_acc=182@0.2784,710@0.2784,1146@0.2784,797@0.2784,1849@0.2784python3 inference.py --mode predict --pattern random_n --seed 17输出:
[predict] seq=random_n_s17 输入=(1,2000) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0146 mean_don=0.0151 max_acc=0.2784 max_don=0.2861 top5_acc=645@0.2784,850@0.2784,890@0.2784,902@0.2784,913@0.2784python3 inference.py --mode predict --pattern random_n --seed 18输出:
[predict] seq=random_n_s18 输入=(1,2000) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0137 mean_don=0.0141 max_acc=0.2784 max_don=0.2861 top5_acc=326@0.2784,685@0.2784,546@0.2784,566@0.2784,593@0.2784python3 inference.py --mode predict --pattern random_n --seed 19输出:
[predict] seq=random_n_s19 输入=(1,2000) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0135 mean_don=0.0140 max_acc=0.2784 max_don=0.2861 top5_acc=761@0.2784,1934@0.2784,1065@0.2784,1058@0.2784,1045@0.2784python3 inference.py --mode predict --pattern random_n --seed 20输出:
[predict] seq=random_n_s20 输入=(1,2000) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0141 mean_don=0.0147 max_acc=0.2784 max_don=0.2861 top5_acc=69@0.2784,863@0.2784,982@0.2784,943@0.2784,893@0.2784python3 inference.py --mode predict --pattern iupac输出:
[predict] seq=iupac 输入=(1,2000) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.2784 mean_don=0.2861 max_acc=0.2784 max_don=0.2861 top5_acc=1999@0.2784,670@0.2784,657@0.2784,658@0.2784,659@0.2784python3 inference.py --mode predict --pattern polyA --device npu:1输出:
[predict] seq=polyA 输入=(1,2000) 设备=npu:1 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0002 max_don=0.0009 top5_acc=1990@0.0002,1982@0.0002,1983@0.0002,1986@0.0002,1988@0.0002python3 inference.py --mode predict --pattern polyC --device npu:1输出:
[predict] seq=polyC 输入=(1,2000) 设备=npu:1 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0002 mean_don=0.0000 max_acc=0.0073 max_don=0.0013 top5_acc=1968@0.0073,1964@0.0070,1962@0.0069,1966@0.0069,1965@0.0068python3 inference.py --mode predict --pattern polyG --device npu:1输出:
[predict] seq=polyG 输入=(1,2000) 设备=npu:1 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0060 mean_don=0.0001 max_acc=0.1821 max_don=0.0059 top5_acc=1964@0.1821,1960@0.1797,1961@0.1775,1963@0.1769,1965@0.1767python3 inference.py --mode predict --pattern polyU --device npu:1输出:
[predict] seq=polyU 输入=(1,2000) 设备=npu:1 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0002 mean_don=0.0000 max_acc=0.0051 max_don=0.0005 top5_acc=1974@0.0051,1973@0.0050,1971@0.0050,1981@0.0050,1972@0.0049python3 inference.py --mode predict --pattern ACGU --device npu:1输出:
[predict] seq=ACGU 输入=(1,2000) 设备=npu:1 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0001 mean_don=0.0003 max_acc=0.0029 max_don=0.0556 top5_acc=1982@0.0029,1970@0.0028,1974@0.0027,1978@0.0026,1986@0.0026python3 inference.py --mode predict --pattern N2000 --device npu:1输出:
[predict] seq=N2000 输入=(1,2000) 设备=npu:1 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.2786 mean_don=0.2860 max_acc=0.2786 max_don=0.2860 top5_acc=1999@0.2786,670@0.2786,657@0.2786,658@0.2786,659@0.2786python3 inference.py --mode predict --pattern ACGU --dtype float16输出:
[predict] seq=ACGU 输入=(1,2000) 设备=npu:0 精度=float16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0001 mean_don=0.0003 max_acc=0.0029 max_don=0.0554 top5_acc=1982@0.0029,1970@0.0028,1974@0.0027,1978@0.0026,1986@0.0025python3 inference.py --mode predict --pattern polyA --dtype float16输出:
[predict] seq=polyA 输入=(1,2000) 设备=npu:0 精度=float16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0002 max_don=0.0008 top5_acc=1990@0.0002,1982@0.0002,1983@0.0002,1985@0.0002,1994@0.0002python3 inference.py --mode predict --pattern N2000 --dtype float16输出:
[predict] seq=N2000 输入=(1,2000) 设备=npu:0 精度=float16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.2783 mean_don=0.2861 max_acc=0.2783 max_don=0.2861 top5_acc=1999@0.2783,670@0.2783,657@0.2783,658@0.2783,659@0.2783| D | 119–125 | D 批量预测(7) | 7 |
python3 inference.py --mode batch --seqs "ACGU"输出:
[batch] n=1 输入=(1, 4) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=[0] n_donor=[0] max_acc=['0.0000']python3 inference.py --mode batch --seqs "ACGU" "ACGU"输出:
[batch] n=2 输入=(2, 4) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=[0, 0] n_donor=[0, 0] max_acc=['0.0000', '0.0000']python3 inference.py --mode batch --seqs "ACGU" "ACGU" "ACGU" "ACGU"输出:
[batch] n=4 输入=(4, 4) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=[0, 0, 0, 0] n_donor=[0, 0, 0, 0] max_acc=['0.0000', '0.0000', '0.0000', '0.0000']python3 inference.py --mode batch --seqs "ACGU" "ACGU" "ACGU" "ACGU" "ACGU" "ACGU" "ACGU" "ACGU"输出:
[batch] n=8 输入=(8, 4) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=[0, 0, 0, 0, 0, 0, 0, 0] n_donor=[0, 0, 0, 0, 0, 0, 0, 0] max_acc=['0.0000', '0.0000', '0.0000', '0.0000', '0.0000', '0.0000', '0.0000', '0.0000']python3 inference.py --mode batch --seqs "AUG" "GCG" "UUU" "ACG" "CGA"输出:
[batch] n=5 输入=(5, 3) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=[0, 0, 0, 0, 0] n_donor=[0, 0, 0, 0, 0]python3 inference.py --mode batch --seqs "AGCAGUCAUUAUGGCGAA" "AUGCACAGCUCAGCACUG"输出:
[batch] n=2 输入=(2, 18) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=[0, 0] n_donor=[0, 0]python3 inference.py --mode batch --seqs "AUG" "GCG" "UUU" "ACG" --device npu:1输出:
[batch] n=4 输入=(4, 3) 设备=npu:1 精度=float32 耗时=0.000s n_acceptor=[0, 0, 0, 0] n_donor=[0, 0, 0, 0]| E | 126–129 | E 序列组成分析(4) | 4 |
python3 inference.py --mode analyze --gc-sweep输出:
[analyze] 类型=GC梯度 n=11 设备=npu:0 精度=float32 GC=0%:acc=0,don=0; GC=10%:acc=0,don=0; GC=20%:acc=0,don=0; GC=30%:acc=0,don=1; GC=40%:acc=0,don=0; GC=50%:acc=0,don=0; GC=60%:acc=0,don=0; GC=70%:acc=0,don=0; GC=80%:acc=0,don=0; GC=90%:acc=0,don=0; GC=100%:acc=0,don=0python3 inference.py --mode analyze --base-profiles输出:
[analyze] 类型=碱基组成 n=4 设备=npu:0 精度=float32 polyA:acc=0,don=0,mean_acc=0.0000; polyC:acc=0,don=0,mean_acc=0.0002; polyG:acc=0,don=0,mean_acc=0.0062; polyU:acc=0,don=0,mean_acc=0.0002python3 inference.py --mode analyze --gc-sweep --dtype bfloat16输出:
[analyze] 类型=GC梯度 n=11 设备=npu:0 精度=bfloat16 GC=0%:acc=0,don=0; GC=10%:acc=0,don=0; GC=20%:acc=0,don=0; GC=30%:acc=0,don=1; GC=40%:acc=0,don=0; GC=50%:acc=0,don=0; GC=60%:acc=0,don=0; GC=70%:acc=0,don=0; GC=80%:acc=0,don=0; GC=90%:acc=0,don=0; GC=100%:acc=0,don=0python3 inference.py --mode analyze --base-profiles --device npu:1输出:
[analyze] 类型=碱基组成 n=4 设备=npu:1 精度=float32 polyA:acc=0,don=0,mean_acc=0.0000; polyC:acc=0,don=0,mean_acc=0.0002; polyG:acc=0,don=0,mean_acc=0.0060; polyU:acc=0,don=0,mean_acc=0.0002| F | 130–146 | F 一致性自检(17) | 17 |
python3 inference.py --mode selftest --pattern ACGU --cpu-npu输出:
[selftest] 对比=NPU-vs-CPU 序列=ACGU max_abs_diff=3.06e-03 一致=Truepython3 inference.py --mode selftest --pattern polyA --cpu-npu输出:
[selftest] 对比=NPU-vs-CPU 序列=polyA max_abs_diff=3.87e-03 一致=Truepython3 inference.py --mode selftest --pattern polyC --cpu-npu输出:
[selftest] 对比=NPU-vs-CPU 序列=polyC max_abs_diff=2.45e-03 一致=Truepython3 inference.py --mode selftest --pattern polyG --cpu-npu输出:
[selftest] 对比=NPU-vs-CPU 序列=polyG max_abs_diff=2.30e-03 一致=Truepython3 inference.py --mode selftest --pattern polyU --cpu-npu输出:
[selftest] 对比=NPU-vs-CPU 序列=polyU max_abs_diff=1.49e-03 一致=Truepython3 inference.py --mode selftest --pattern GC50 --cpu-npu输出:
[selftest] 对比=NPU-vs-CPU 序列=GC50 max_abs_diff=2.35e-03 一致=Truepython3 inference.py --mode selftest --pattern N2000 --cpu-npu输出:
[selftest] 对比=NPU-vs-CPU 序列=N2000 max_abs_diff=0.00e+00 一致=Truepython3 inference.py --mode selftest --pattern ACGU --dtype-sweep输出:
[selftest] 对比=fp32-vs-bfloat16 序列=ACGU max_abs_diff=1.24e-01 一致=Falsepython3 inference.py --mode selftest --pattern polyA --dtype-sweep输出:
[selftest] 对比=fp32-vs-bfloat16 序列=polyA max_abs_diff=2.01e-01 一致=Falsepython3 inference.py --mode selftest --pattern polyG --dtype-sweep输出:
[selftest] 对比=fp32-vs-bfloat16 序列=polyG max_abs_diff=9.18e-02 一致=Falsepython3 inference.py --mode selftest --pattern ACGU --device-sweep输出:
[selftest] 对比=npu0-vs-npu1 序列=ACGU max_abs_diff=7.08e-02 一致=Falsepython3 inference.py --mode selftest --pattern polyA --device-sweep输出:
[selftest] 对比=npu0-vs-npu1 序列=polyA max_abs_diff=8.82e-02 一致=Falsepython3 inference.py --mode selftest --pattern polyG --device-sweep输出:
[selftest] 对比=npu0-vs-npu1 序列=polyG max_abs_diff=2.90e-02 一致=Falsepython3 inference.py --mode selftest --pattern polyC --device-sweep输出:
[selftest] 对比=npu0-vs-npu1 序列=polyC max_abs_diff=4.63e-02 一致=Falsepython3 inference.py --mode selftest --pattern polyU --device-sweep输出:
[selftest] 对比=npu0-vs-npu1 序列=polyU max_abs_diff=7.29e-02 一致=Falsepython3 inference.py --mode selftest --pattern ACGU --info输出:
[selftest] 模型信息: 参数量=359,043 可训练=359,043 num_labels=3 hidden_size=32 context=2000 vocab_size=4 stages=3python3 inference.py --mode selftest --pattern ACGU --all输出:
[selftest] 对比=NPU-vs-CPU 序列=ACGU max_abs_diff=3.06e-03 一致=True| G | 148–164 | G 边界与 Tokenizer(17) | 17 |
python3 inference.py --mode tokenize --seq ACGU输出:
[tokenize] vocab=5 pad=N/4 unk=N/4 seq='ACGU' ids=[0, 1, 2, 3]python3 inference.py --mode predict --pattern iupac输出:
[tokenize] vocab=5 pad=N/4 unk=N/4 seq='RYWSKMBVDH' ids=[4, 4, 4, 4, 4, 4, 4, 4, 4, 4]python3 inference.py --mode tokenize --seq lowercase输出:
[tokenize] vocab=5 pad=N/4 unk=N/4 seq='acgu' ids=[0, 1, 2, 3]python3 inference.py --mode predict --seq A --name short_1输出:
[predict] seq=short_1 输入=(1,1) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=1 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0000 max_don=0.0000 top5_acc=0@0.0000python3 inference.py --mode predict --seq ACGU --name short_4输出:
[predict] seq=short_4 输入=(1,4) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=4 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0000 max_don=0.0000 top5_acc=2@0.0000,1@0.0000,0@0.0000,3@0.0000python3 inference.py --mode predict --seq "$(python3 -c 'print("A"*5000)')" --name long_5000输出:
[predict] seq=long_5000 输入=(1,5000) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=5000 mean_acc=0.0000 mean_don=0.0000 max_acc=0.0002 max_don=0.0008 top5_acc=4990@0.0002,4982@0.0002,4983@0.0002,4986@0.0002,4985@0.0002python3 inference.py --mode predict --pattern N2000输出:
[predict] seq=N2000 输入=(1,2000) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.2784 mean_don=0.2861 max_acc=0.2784 max_don=0.2861 top5_acc=1999@0.2784,670@0.2784,657@0.2784,658@0.2784,659@0.2784python3 inference.py --mode predict --seq "$(python3 -c 'print("acgu"*500)')" --name lowercase输出:
[predict] seq=lowercase 输入=(1,2000) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0001 mean_don=0.0003 max_acc=0.0029 max_don=0.0552 top5_acc=1982@0.0029,1970@0.0028,1974@0.0027,1978@0.0026,1986@0.0025python3 inference.py --mode predict --seq "$(python3 -c 'print("ACGT"*500)')" --name u_to_t输出:
[predict] seq=u_to_t 输入=(1,2000) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0001 mean_don=0.0003 max_acc=0.0029 max_don=0.0552 top5_acc=1982@0.0029,1970@0.0028,1974@0.0027,1978@0.0026,1986@0.0025python3 inference.py --mode predict --seq "$(python3 -c 'print("ZQXF"*500)')" --name unknown输出:
[predict] seq=unknown 输入=(1,2000) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.2784 mean_don=0.2861 max_acc=0.2784 max_don=0.2861 top5_acc=1999@0.2784,670@0.2784,657@0.2784,658@0.2784,659@0.2784python3 inference.py --mode predict --pattern ACGU --device npu:1 --dtype bfloat16输出:
[predict] seq=ACGU_npu1_bf16 输入=(1,2000) 设备=npu:1 精度=bfloat16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0001 mean_don=0.0003 max_acc=0.0030 max_don=0.0537 top5_acc=1982@0.0030,1970@0.0029,1974@0.0027,1978@0.0027,1986@0.0025python3 inference.py --mode predict --seq "$(python3 -c 'print("CG"*1000)')" --name cpg_rich输出:
[predict] seq=cpg_rich 输入=(1,2000) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0005 mean_don=0.0000 max_acc=0.0156 max_don=0.0014 top5_acc=1973@0.0156,1965@0.0152,1971@0.0152,1963@0.0147,1975@0.0147python3 inference.py --mode predict --seq "$(python3 -c 'print("AU"*1000)')" --name au_repeat输出:
[predict] seq=au_repeat 输入=(1,2000) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0003 mean_don=0.0001 max_acc=0.0163 max_don=0.0020 top5_acc=1984@0.0163,1990@0.0159,1986@0.0157,1982@0.0157,1988@0.0156python3 inference.py --mode predict --seq "$(python3 -c 'print("."*2000)')" --name dot2000输出:
[predict] seq=dot2000 输入=(1,2000) 设备=npu:0 精度=float32 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.2784 mean_don=0.2861 max_acc=0.2784 max_don=0.2861 top5_acc=1999@0.2784,670@0.2784,657@0.2784,658@0.2784,659@0.2784python3 inference.py --mode predict --gene NONEXISTENT输出:
[ERROR] ValueError: 未知基因模板: NONEXISTENTpython3 inference.py --mode predict --pattern polyG --dtype float16输出:
[predict] seq=polyG_f16 输入=(1,2000) 设备=npu:0 精度=float16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0062 mean_don=0.0001 max_acc=0.1865 max_don=0.0060 top5_acc=1964@0.1865,1960@0.1836,1963@0.1819,1965@0.1819,1961@0.1813python3 inference.py --mode predict --pattern polyU --dtype float16输出:
[predict] seq=polyU_f16 输入=(1,2000) 设备=npu:0 精度=float16 耗时=0.000s n_acceptor=0 n_donor=0 n_neither=2000 mean_acc=0.0002 mean_don=0.0000 max_acc=0.0051 max_don=0.0005 top5_acc=1974@0.0051,1971@0.0051,1973@0.0051,1981@0.0051,1970@0.0050TransformersKwargs / capture_outputs /
can_return_tuple / transformers.initialization),因此 venv 内安装
transformers==5.9.0 覆盖系统 4.57.6;import multimolecule 方可成功。.to("npu:0") / .to("npu:1") 转移到 Ascend 910B;
device_map 不适用于 NPU,需手动指定设备。(batch, seq_len, 3) logit(neither, acceptor,
donor),softmax 得到概率;inference.py 报告每个位置的 argmax 分类统计、
acceptor/donor 概率的均值/最大值、Top-5 最高置信度 acceptor 位置。dtype: float32,float32 为推荐精度;实测 bf16
/ fp16 精度损失较大,生产环境推荐 float32。贡献者: zzstudio | 赛道: 模型适配赛道
NPU 标签:本仓库适配昇腾 NPU(Ascend 910B)推理,hardware: NPU。
OpenSpliceAI 为 1D 扩张残差 CNN 判别式序列预测模型,输入可变长 pre-mRNA 序列,输出每个位置的三分类剪切位点概率;不是自回归 LLM,因此使用 torch_npu 推理引擎而非 vLLM-Ascend / sglang。 ↩ ↩2
如需镜像源安装依赖,请使用 -i https://pypi.tuna.tsinghua.edu.cn/simple
或 -i https://mirrors.aliyun.com/pypi/simple;模型下载可配
HF_ENDPOINT=https://hf-mirror.com。 ↩
OpenSpliceAI 的 logit 动态范围较大(实测约 -20 ~ +15),NPU 上
fp32-vs-bf16 max_abs_diff ≈ 0.1、fp32-vs-fp16 max_abs_diff ≈ 0.07,
半精度精度损失较明显;float32 为该模型的推荐推理精度(与模型 config
dtype: float32 一致)。 ↩ ↩2