liucu/chrombpnet
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

multimolecule/chrombpnet on Ascend NPU

模型与任务

  • 模型:multimolecule/chrombpnet
  • Revision:74a4692c4ed0e4974345fd8f9d4367beab9280ca
  • 适配路线:regulatory-sequence
  • 设备:npu:0

环境依赖

{
  "torch": "2.9.0+cpu",
  "torch_npu": "2.9.0.post1",
  "device_name": "Ascend910_9362",
  "device_count": 2,
  "npu_available": true,
  "cann": "8.5.1"
}

安装:pip install -r requirements.txt

NPU 推理

默认执行:python inference.py

真实输入

{
  "sequence_length": 2114,
  "profile_length": 1000,
  "vocab_size": 5,
  "alphabet": "DNA ACGT N",
  "primary": "p53_2114",
  "primary_sha256": "233616d27f86001aabc4b0f2e537ed3d0e40e96c1e50669e72cd1cb9ebf23d8a",
  "batch": 1,
  "dtype": "float32",
  "other_sequences": [
    "hemoglobin_2114",
    "brca1_2114",
    "telomerase_2114",
    "synthetic_acgt_2114"
  ]
}

真实推理结果

{
  "profile_shape": [
    1,
    1000,
    1
  ],
  "count_shape": [
    1,
    1
  ],
  "track_shape": [
    1,
    1000,
    1
  ],
  "track_stats": {
    "min": 0.000445725949248299,
    "max": 3.703517198562622,
    "mean": 0.31942787766456604,
    "sum": 319.4278564453125
  },
  "count_logits": [
    [
      5.766531467437744
    ]
  ],
  "device": "npu:0",
  "dtype": "torch.float32"
}

CPU-NPU 一致性

{
  "profile_max_abs_diff": 0.00093841552734375,
  "profile_mean_abs_diff": 0.00039045143127441407,
  "count_max_abs_diff": 0.00023698806762695312,
  "track_max_abs_diff": 0.0017235279083251953,
  "track_mean_abs_diff": 8.566882618470117e-05,
  "track_pearson_r": 1.0,
  "atol_profile": 0.001,
  "atol_track": 0.002,
  "rtol": 0.001,
  "passed": true
}

性能

{
  "avg_ms": 12.66,
  "p50_ms": 12.66,
  "throughput_seq_per_s": 79.02,
  "throughput_bases_per_s": 167038.0,
  "warmup": 3,
  "stable_iters": 10,
  "batch": 1,
  "sequence_length": 2114,
  "profile_length": 1000,
  "dtype": "float32",
  "device": "npu:0"
}

自验证截图

Agent workflow

NPU device call

Model result

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

已知限制

  • 仅对 2114 bp 固定窗口、HEK293T GFP ATAC 单轨、float32、Ascend910 单卡完成验证;长上下文窗口外或多任务 head 未验证。

标签

#NPU #Ascend #Ascend910