m
mengsihan/deltasplice
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

multimolecule/deltasplice on Ascend NPU

模型与任务

  • 模型:multimolecule/deltasplice
  • Revision:c3196093da03379a21515bf1a25602fa86b40f9c
  • 适配路线:splicing
  • 设备:npu:0

环境依赖

{
  "python": "3.11.14",
  "platform": "Linux-5.10.0-182.0.0.95.r2220_156.hce2.aarch64-aarch64-with-glibc2.35",
  "torch": "2.9.0+cpu",
  "torch_npu": "2.9.0.post1+gitee7ba04",
  "transformers": "5.9.0",
  "numpy": "1.26.4",
  "multimolecule": "installed",
  "npu_device_name": "Ascend910_9362",
  "npu_device_count": 2,
  "cann": "/usr/local/Ascend/cann-8.5.1",
  "dtype": "float32"
}

安装:pip install -r requirements.txt

NPU 推理

默认执行:python inference.py

真实输入

{
  "species": "human",
  "locus": "HBB (NM_000518.5 / NG_000007.3) exon1-intron1 splice donor",
  "strand": "5'->3' RNA (T->U)",
  "reference_rna_length": 200,
  "reference_sha256": "6e66a0152255e6610b9a6b88ba8a8e990021768fe6060383c4c8d4a3b53ea4db",
  "alternative_sha256": "301709968b63b0ade61c421c17e1380ff0226253bf1e97e447d95ac49415d2db",
  "donor_gt_pos": 142,
  "variant": "IVS1+1 G>A (beta-thalassaemia), reference donor GU -> alternative donor AU",
  "tokenizer": "RnaTokenizer",
  "alphabet": "A/C/G/U/N",
  "pad_token": "N (id 4)"
}

真实推理结果

{
  "channels": [
    "no_splice",
    "acceptor",
    "donor"
  ],
  "probabilities_shape": [
    1,
    200,
    3
  ],
  "delta_shape": [
    1,
    200,
    3
  ],
  "ref_scored_shape": [
    1,
    200,
    3
  ],
  "dtype": "float32",
  "donor_channel_peak": 0.275924,
  "donor_channel_peak_pos": 141,
  "donor_probability_at_junction": 0.275924,
  "IVS1+1_G>A_delta_donor": -0.001111,
  "delta_acceptor_min": -0.262501,
  "per_position_probability_sum_mean": 1.0,
  "finite": true
}

CPU-NPU 一致性

{
  "cpu_output": "work/cpu_ref.npz",
  "npu_output": "work/npu_ref.npz",
  "atol": 0.001,
  "rtol": 0.01,
  "probabilities_max_abs_diff": 0.00017783045768737793,
  "probabilities_mean_abs_diff": 8.559108826074654e-07,
  "delta_max_abs_diff": 0.00011280179023742676,
  "delta_mean_abs_diff": 1.1945964562561546e-06,
  "ref_scored_max_abs_diff": 0.00011286139488220215,
  "ref_scored_mean_abs_diff": 8.742061869545145e-07,
  "same_weights": true,
  "same_sequence": true,
  "same_preprocessing": true,
  "same_dtype": "float32",
  "same_seed": 0
}

性能

{
  "device": "npu:0",
  "warmup": 3,
  "repeats": 10,
  "mean_s": 0.046625,
  "median_s": 0.046633,
  "min_s": 0.046538,
  "max_s": 0.046707,
  "input_length": 200,
  "bases_per_s": 4289.5,
  "timing_method": "torch.npu.synchronize() around each iteration",
  "peak_memory_note": "single Ascend910 64GB HBM; model ~40.4M params float32"
}

自验证截图

Agent workflow

NPU device call

Model result

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

已知限制

  • 仅对本次记录的模型 revision、输入契约(200 nt HBB pre-mRNA 窗口)、float32 dtype 与 Ascend910 环境完成验证。
  • 单序列 smoke consistency + CPU-NPU 数值一致性,非完整精度评测;未使用带标签的剪接数据集计算 AUPRC。
  • DeltaSplice 使用 5 个内部集成成员的平均预测;权重为官方 MultiMolecule 发布的 AGPL-3.0 checkpoint。

标签

#NPU #Ascend #Ascend910