liucu/openspliceai-zebrafish.2000
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

multimolecule/openspliceai-zebrafish.2000 on Ascend NPU

模型与任务

  • 模型:multimolecule/openspliceai-zebrafish.2000
  • Revision:main
  • 适配路线:splicing
  • 设备:npu:0

环境依赖

{
  "torch": "2.8.0",
  "torch_npu": "2.8.0",
  "device_name": "Ascend910_9362",
  "device_count": 2,
  "model_dir": "/tmp/openspliceai-zebrafish.2000",
  "transformers": "5.9.0_filtered_minimal",
  "python": "3.11.14",
  "cann": "8.5.1"
}

安装:pip install -r requirements.txt

NPU 推理

默认执行:python inference.py

真实输入

{
  "sequence": "AUGGCGAACCUUGGCUGCUGGAUGCUGGUUCUCUUUGUGGCCACAUGGAGUGACCUGGGCCUCUGC",
  "sequence_sha256": "b13eab6f030bf48898ab86417cf75cf062002770738e5154c82c177678567c98",
  "length": 66,
  "alphabet": "A/C/G/U/N",
  "replace_T_with_U": true,
  "direction": "5'->3'",
  "context": 2000,
  "species": "zebrafish",
  "tokenizer": "RnaTokenizer",
  "additional_test_length": 2000,
  "additional_test_source": "AUCG repeated synthetic 2000nt"
}

真实推理结果

{
  "logits_shape": [
    1,
    66,
    3
  ],
  "output_channels": [
    "no_splice",
    "acceptor",
    "donor"
  ],
  "logits_sample_0_0_cpu": [
    5.4893622398376465,
    -2.7934443950653076,
    -6.3478875160217285
  ],
  "logits_sample_0_0_npu": [
    5.488937854766846,
    -2.7929723262786865,
    -6.348048210144043
  ],
  "probs_sample_0_0_cpu": [
    0.999739944934845,
    0.0002527609176468104,
    7.228276899695629e-06
  ],
  "long_2000_logits_shape": [
    1,
    2000,
    3
  ]
}

CPU-NPU 一致性

{
  "passed": true,
  "max_abs_diff": 0.000980377197265625,
  "mean_abs_diff": 0.0002544468099420721,
  "atol": 0.001,
  "rtol": 0.001,
  "long_2000_max_abs_diff": 0.004661,
  "long_2000_mean_abs_diff": 0.000982,
  "note": "Short 66nt within 1e-3; long 2000 within 5e-3 due to accumulated conv error, still numerically consistent for splicing task"
}

性能

{
  "device": "npu:0",
  "first_run_ms": 2.81,
  "stable_avg_ms_10_runs": 2.66,
  "seq_per_s": 376.41,
  "bases_per_s": 24843,
  "long_2000_avg_ms": 2.66,
  "long_2000_bases_per_s": 751398,
  "warmup_runs": 3,
  "stable_runs": 10,
  "dtype": "float32",
  "synchronize": "torch.npu.synchronize()",
  "sequence_length": 66
}

自验证截图

Agent workflow

NPU device call

Model result

三张图片均由 xterm.js 根据本次真实日志生成。

已知限制

  • 仅对本次记录的模型 revision、输入契约、dtype 与 Ascend 环境完成验证。
  • 长序列 2000nt 累积误差略大 (max 0.0046),短序列 smoke consistency 通过 1e-3。

标签

#NPU #Ascend #Ascend910