waylong/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_version": "2.9.0+cpu",
  "torch_npu_available": true,
  "device_name": "Ascend910_9362",
  "device_count": 2,
  "transformers_version": "5.9.0",
  "multimolecule_version": "0.2.1",
  "dtype": "torch.float32"
}

安装:pip install -r requirements.txt

NPU 推理

默认执行:python inference.py

真实输入

{
  "sequence_length": 800,
  "sequence_sha256": "be90f82b3230b6c0c5ca4599037df7b22758b4ffd7421a91f3426704f5b4bb94",
  "sequence_preview": "GGAUGUGAGGGCGAUCUGGCUGCGACAUCUGUCACCCCAUUGAUCGCCAGGGUUGAUUCGGCUGAUCUGGCUGGCUAGGC",
  "alphabet": "A/C/G/U",
  "species": "Danio rerio",
  "genome": "danRer11",
  "input_ids_shape": [
    1,
    800
  ],
  "attention_mask_shape": [
    1,
    800
  ],
  "vocab_size": 5,
  "context": 2000,
  "tokenizer": "RnaTokenizer"
}

真实推理结果

{
  "logits_shape": [
    1,
    800,
    3
  ],
  "logits_dtype": "torch.float32",
  "logits_device": "npu:0",
  "probs_shape": [
    1,
    800,
    3
  ],
  "top_donor_pos": 786,
  "top_donor_prob": 0.018207278102636337,
  "top_acceptor_pos": 787,
  "top_acceptor_prob": 0.06950794160366058,
  "channels": [
    "no_splice",
    "acceptor",
    "donor"
  ]
}

CPU-NPU 一致性

{
  "max_abs_diff": 0.0023992061614990234,
  "mean_abs_diff": 0.00038546224823221564,
  "atol": 0.01,
  "rtol": 0.01,
  "passed": true,
  "top_donor_match": true,
  "top_acceptor_match": true
}

性能

{
  "avg_latency_ms": 2.7785539627075195,
  "min_latency_ms": 2.736806869506836,
  "max_latency_ms": 2.9044151306152344,
  "p50_latency_ms": 2.7642250061035156,
  "seq_per_s": 359.89943453376924,
  "bases_per_s": 287919.5476270154,
  "batch_size": 1,
  "sequence_length": 800,
  "dtype": "torch.float32",
  "device": "npu:0",
  "peak_mem_gib": 0.5578041076660156
}

自验证截图

Agent workflow

NPU device call

Model result

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

已知限制

  • 仅对本次记录的模型 revision、输入契约、dtype 与 Ascend 环境完成验证。

标签

#NPU #Ascend #Ascend910