waylong/maxentscan-score3-npu
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

multimolecule/maxentscan-score3 on Ascend NPU

模型与任务

  • 模型:multimolecule/maxentscan-score3
  • Revision:a6329dab709cf4e4a15c70124acbdafa48097d28
  • 适配路线:splicing
  • 设备:npu:0

环境依赖

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

安装:pip install -r requirements.txt

NPU 推理

默认执行:python inference.py

真实输入

{
  "sequences": [
    "AAUCGAUCGAUCGAUCGAUCGAU",
    "UUUUCCUUUCCCCAGGUAAUGGA",
    "CAGGUAGGUCCCCAGGUAGGUCC",
    "GCGCGCGCGCGCGCGCGCGCGCG"
  ],
  "sha256": "2ef19e5865ef06845a24fa27f891ed1d83ca80184adf4fffcdcf36ded6b11efd",
  "window": 23,
  "batch": 4,
  "vocab": "ACGU(N)",
  "mode": "score3",
  "species": "human",
  "alphabet": "RNA A/C/G/U"
}

真实推理结果

{
  "logits_shape": [
    4,
    1
  ],
  "logits_dtype": "float32",
  "cpu_logits": [
    -15.252821,
    -8.015792,
    -17.081438,
    -11.004184
  ],
  "npu_logits": [
    -15.252821,
    -8.015792,
    -17.081438,
    -11.004184
  ]
}

CPU-NPU 一致性

{
  "max_abs_diff": 0.0,
  "mean_abs_diff": 0.0,
  "atol": 0.0001,
  "rtol": 0.0001,
  "passed": true
}

性能

{
  "iterations": 10,
  "total_s": 0.039349595084786415,
  "avg_ms": 3.934959508478641,
  "seq_per_s": 1016.5288845745976,
  "bases_per_s": 23380.164345215744,
  "dtype": "float32",
  "batch": 4,
  "window": 23,
  "mem_allocated": 337920,
  "max_mem_allocated": 344064
}

自验证截图

Agent workflow

NPU device call

Model result

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

已知限制

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

标签

#NPU #Ascend #Ascend910