jsjs1258/maxentscan-score5-NPU
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

multimolecule/maxentscan-score5 on Ascend NPU

模型与任务

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

环境依赖

{
  "torch": "2.9.0+cpu",
  "torch_npu": "2.9.0.post1+gitee7ba04",
  "device_name": "Ascend910_9362",
  "npu_count": 2,
  "python": "3.11.14",
  "multimolecule": "0.4.7",
  "transformers": "4.57.1",
  "hf_endpoint": "https://hf-mirror.com"
}

安装:pip install -r requirements.txt

NPU 推理

默认执行:python inference.py

真实输入

{
  "sequences": [
    "CAGGTAGGT",
    "AAGGTACGT",
    "CAGGTGAGT",
    "GTAAGTTTT",
    "TTTTTTTTT",
    "CCCCCCCCC",
    "AACCGGTAA",
    "GGGGTGGGG"
  ],
  "sha256": "f52b6621973362d9574ba212ff1c8c008963809cec9d1fbcce137cc78b683806",
  "window": 9,
  "alphabet": "ACGU/N (DNA T->U)",
  "tokenizer": "RnaTokenizer",
  "batch": 8,
  "dtype": "float32",
  "source": "human donor consensus + negative controls, traceable fixture"
}

真实推理结果

{
  "shape": [
    8,
    1
  ],
  "dtype": "float32",
  "device": "npu:0",
  "logits_cpu": [
    10.280213356018066,
    10.746074676513672,
    10.673585891723633,
    -30.759328842163086,
    -31.079252243041992,
    -31.02950668334961,
    -28.89767837524414,
    -0.13592524826526642
  ],
  "logits_npu": [
    10.280213356018066,
    10.746074676513672,
    10.673585891723633,
    -30.759326934814453,
    -31.079252243041992,
    -31.029504776000977,
    -28.89767837524414,
    -0.13592524826526642
  ],
  "task": "MaxEntScan 5' splice donor scoring (log2 scale)"
}

CPU-NPU 一致性

{
  "max_abs_diff": 1.9073486328125e-06,
  "mean_abs_diff": 4.76837158203125e-07,
  "atol": 1e-05,
  "rtol": 1e-05,
  "passed": true,
  "ranking_match": true,
  "metric": "max_abs_diff within dtype tolerance, ranking preserved"
}

性能

{
  "avg_ms": 1.14,
  "p50_ms": 1.15,
  "first_latency_ms": 1.01,
  "batch": 8,
  "window": 9,
  "seq_per_s": 7027.0,
  "bases_per_s": 63249.0,
  "dtype": "float32",
  "warmup": 3,
  "stable_runs": 10,
  "device": "npu:0",
  "peak_hbm_mb": 3166
}

自验证截图

Agent workflow

NPU device call

Model result

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

已知限制

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

标签

#NPU #Ascend #Ascend910