gcw_6a3w2yXz/multimolecule-deltasplice-NPU-final
模型介绍
文件和版本
Pull Requests
讨论
分析

multimolecule/deltasplice 在 Ascend NPU 上

模型与任务

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

环境依赖

{
  "torch": "2.9.0+cpu",
  "torch_npu": "2.9.0.post1+gitee7ba04",
  "npu_available": true,
  "device_count": 2,
  "device_name": "Ascend910_9362",
  "model_dir": "/tmp/deltasplice_model",
  "python": "3.11.14"
}

安装:pip install -r requirements.txt

NPU 推理

默认执行:python inference.py

真实输入

{
  "sequences": [
    "short_ref_29",
    "prion_62"
  ],
  "sequence_lengths": [
    29,
    66
  ],
  "batch": 2,
  "max_length": 66,
  "alphabet": "A/C/G/U/N (T->U)",
  "variant_pair": {
    "ref_name": "prion_62",
    "alt_name": "prion_62_alt",
    "ref_len": 29,
    "alt_len": 29,
    "variant_pos": 15
  },
  "sha256_prefix": {
    "short_ref_29": "b7f89be8dec01e55",
    "prion_62": "b13eab6f030bf488"
  },
  "delta_pair_sha256": {
    "ref": "b7f89be8dec01e55",
    "alt": "0df7e5524280f118"
  }
}

真实推理结果

{
  "probabilities_shape": [
    2,
    66,
    3
  ],
  "probabilities_dtype": "torch.float32",
  "probabilities_device": "npu:0",
  "site_probabilities_shape": [
    2,
    66,
    3
  ],
  "delta_shape": [
    1,
    29,
    3
  ],
  "delta_dtype": "torch.float32",
  "cpu_acceptor_max": [
    0.00013249977200757712,
    8.311284909723327e-05
  ],
  "npu_acceptor_max": [
    0.0001324490294791758,
    8.31621146062389e-05
  ],
  "cpu_donor_max": [
    0.0009367369930259883,
    4.252742655808106e-05
  ],
  "npu_donor_max": [
    0.0009366910089738667,
    4.253661245456897e-05
  ]
}

CPU-NPU 一致性

{
  "max_abs_probs": 1.1920928955078125e-07,
  "mean_abs_probs": 4.7947232850731325e-09,
  "max_abs_site": 2.9671937227249146e-06,
  "mean_abs_site": 5.010230808011329e-08,
  "max_abs_delta": 9.537325240671635e-08,
  "mean_abs_delta": 5.039868522516144e-09,
  "pearson_probs": 0.9999999999999997,
  "pearson_delta": 0.9999999866378123,
  "passed": true
}

性能

{
  "first_latency_ms": 302.41317488253117,
  "avg_latency_ms": 86.13208141177893,
  "min_ms": 86.00117824971676,
  "max_ms": 86.22451219707727,
  "p50_ms": 86.15328092128038,
  "p95_ms": 86.22451219707727,
  "sequences_per_s": 23.220151739262295,
  "bases_per_s": 1102.957207614959,
  "bases_per_s_max_len": 1532.5300147913115,
  "batch": 2,
  "max_len": 66,
  "total_bases": 95,
  "dtype": "float32"
}

自验证截图

智能体工作流程

NPU 设备调用

模型结果

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

已知限制

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

标签

#NPU #Ascend #Ascend910