jsjs1258/deltasplice-human-NPU
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

multimolecule/deltasplice-human on Ascend NPU

模型与任务

  • 模型:multimolecule/deltasplice-human
  • Revision:7a97fb2153016f4b1778590d48e45fd4317eb969
  • 适配路线:splicing
  • 设备:npu:0

环境依赖

{
  "torch": "2.9.0+cpu",
  "torch_npu": "2.9.0.post1+gitee7ba04",
  "device_name": "Ascend910_9362",
  "model_dir": "/data/adapt-npu-agent/jobs/26b666d5d910488c82443d3cd7711063/c1362f9ae2ba423ea26f6910cb387cad/workspace/model_weights",
  "dtype": "float32"
}

安装:pip install -r requirements.txt

NPU 推理

默认执行:python inference.py

真实输入

{
  "short_ref": "AGCAGUCAUUAUGGCGAAUCUGGCAAGUA",
  "short_ref_length": 29,
  "short_ref_sha256": "b7f89be8dec01e5543f9ded687a50d7feaa2b3fde1ec2ec958bd023a7e6b8bf1",
  "short_alt_sha256": "0df7e5524280f11858d5badd9b936e0f0a646af4ef4f353435c320945cea2228",
  "long_ref_length": 512,
  "long_ref_sha256": "3b806bb67ef5953ce3ff61f3f49907b837b70530679e56a9b8b90f8262b4e5fd",
  "tokenizer": "RnaTokenizer",
  "alphabet": "A/C/G/U/N -> ids 0-4",
  "context": 30000,
  "num_labels": 3,
  "output_channels": [
    "no_splice",
    "acceptor",
    "donor"
  ]
}

真实推理结果

{
  "probabilities_shape": [
    1,
    29,
    3
  ],
  "site_probabilities_shape": [
    1,
    29,
    3
  ],
  "delta_shape": [
    1,
    29,
    3
  ],
  "cpu_donor_max": 1.751160016283393e-05,
  "npu_donor_max": 1.7462463802075945e-05,
  "cpu_acceptor_max": 0.00011855623597512022,
  "npu_acceptor_max": 0.00011867884313687682,
  "prob_sum_check": [
    1.0,
    1.0,
    1.0,
    1.0,
    1.0
  ]
}

CPU-NPU 一致性

{
  "probabilities_max_abs_diff": 1.226071617566049e-07,
  "probabilities_mean_abs_diff": 4.915420515061442e-09,
  "site_probabilities_max_abs_diff": 1.5419209375977516e-06,
  "site_probabilities_mean_abs_diff": 8.860722999770587e-08,
  "delta_max_abs_diff": 0.0,
  "delta_mean_abs_diff": 0.0,
  "atol": 5e-05,
  "rtol": 0.0001,
  "passed": true
}

性能

{
  "sequence_length": 29,
  "long_sequence_length": 512,
  "batch_size": 1,
  "dtype": "float32",
  "device": "npu:0",
  "first_ms": 48.04,
  "stable_avg_ms": 49.03,
  "stable_min_ms": 47.91,
  "stable_max_ms": 50.7,
  "throughput_short_seq_per_s": 20.39,
  "bases_per_s": 591.45
}

自验证截图

Agent workflow

NPU device call

Model result

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

已知限制

  • 仅对本次记录的模型 revision、输入契约、dtype 与 Ascend 环境完成验证。
  • 长上下文 30kb 显存已预检;本次 smoke 使用 29 与 512 长度代表。

标签

#NPU #Ascend #Ascend910