jsjs1258/openspliceai-mane.400
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

multimolecule/openspliceai-mane.400 on Ascend NPU

模型与任务

  • 模型:multimolecule/openspliceai-mane.400
  • Revision:eb24f956d1e6182eaa6e1110820cb30542f1ad66
  • 适配路线:splicing
  • 设备:npu:0

环境依赖

{
  "torch": "2.9.0+cpu",
  "torch_npu": "2.9.0.post1",
  "transformers": "5.9.0",
  "multimolecule": "0.2.1",
  "cann": "8.5.1",
  "device_name": "Ascend910_9362",
  "npu_count": 2,
  "python": "3.11.14"
}

安装:pip install -r requirements.txt

NPU 推理

默认执行:python inference.py

真实输入

{
  "sequence_length": 800,
  "sequence_sha256": "482fc88a9be0ff0d5e4d1e456d75d0ccd324b158be3f24794245f95df6bb0ce5",
  "sequence_source": "synthetic deterministic pre-mRNA (MANE-like) with GT donor at 200 and AG acceptor at 500",
  "alphabet": "A/C/G/T (T->U by tokenizer)",
  "strand": "5'->3'",
  "tokenizer": "RnaTokenizer",
  "input_shape": [
    1,
    800
  ],
  "context": 400,
  "species": "human MANE"
}

真实推理结果

{
  "output_type": "per-nucleotide logits",
  "logits_shape": [
    1,
    800,
    3
  ],
  "classes": [
    "neither",
    "acceptor",
    "donor"
  ],
  "logits_dtype": "float32",
  "logits_device": "npu:0",
  "softmax_normalized": true,
  "predicted_distribution": {
    "neither": 800,
    "acceptor": 0,
    "donor": 0
  },
  "top_donor": [
    {
      "pos": 799,
      "prob": 3e-05
    },
    {
      "pos": 792,
      "prob": 2e-05
    }
  ],
  "top_acceptor": [
    {
      "pos": 669,
      "prob": 0.0002
    },
    {
      "pos": 674,
      "prob": 0.0002
    }
  ],
  "finite": true
}

CPU-NPU 一致性

{
  "cpu_npu_max_abs_diff": 0.003261566162109375,
  "cpu_npu_mean_abs_diff": 0.0006348178661816443,
  "atol": 0.01,
  "rtol": 0.001,
  "passed": true,
  "shape": [
    1,
    800,
    3
  ],
  "elements": 2400,
  "dtype_strategy": "float32",
  "comparison": "logits tensor exact match with torch.npu"
}

性能

{
  "warmup_iterations": 3,
  "stable_iterations": 10,
  "avg_ms": 2.67,
  "total_ms_10_iters": 26.92,
  "seq_per_s": 375.15,
  "bases_per_s": 300123,
  "sequence_length": 800,
  "batch_size": 1,
  "dtype": "float32",
  "device": "npu:0",
  "measurement": "torch.npu.synchronize before and after each iteration"
}

自验证截图

Agent workflow

NPU device call

Model result

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

已知限制

  • 仅对本次记录的模型 revision、输入契约、dtype 与 Ascend 环境完成验证。
  • 合成序列 smoke test,非完整精度评测;正式评测需物种专属标注数据。

标签

#NPU #Ascend #Ascend910