jsjs1258/deepcpgdna-smallwood2014-serum
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

multimolecule/deepcpgdna-smallwood2014-serum on Ascend NPU

模型与任务

  • 模型:multimolecule/deepcpgdna-smallwood2014-serum
  • Revision:b4f028333f9cf613e8b502bf68f7f0246c0a2438
  • 适配路线:regulatory-sequence
  • 设备:npu:0

环境依赖

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

安装:pip install -r requirements.txt

NPU 推理

默认执行:python inference.py

真实输入

{
  "sequence_length": 1001,
  "sequence_sha256": "72558a15e155d8dd6edc62f222265905d7f6fc3b061c0b238f31524b7ee22f6b",
  "sequence_preview": "ACTCCCCTGCCCTCAACAAGATGTTTTGCCAACTGGCCAAGACCTGCCCTGTGCAGCTGTGGGTTGATTCCACACCCCCG",
  "alphabet": "A/C/G/T/N",
  "input_ids_shape": [
    1,
    1001
  ],
  "attention_mask_sum": 1001,
  "species": "mus musculus (mESC serum, Smallwood2014)",
  "task": "per-cell methylation logits 18 cells"
}

真实推理结果

{
  "logits_shape": [
    1,
    18
  ],
  "num_cells": 18,
  "id2label": {
    "0": "BS27_1_SER",
    "1": "BS27_3_SER",
    "17": "BS29_9_SER"
  },
  "cpu_logits": [
    0.401579886674881,
    -1.0109394788742065,
    -0.8431023359298706,
    -0.7538338899612427,
    0.08816879987716675,
    -1.0305255651474,
    0.27521848678588867,
    -0.44277435541152954,
    -0.016761671751737595,
    -0.6676051616668701,
    -0.7632472515106201,
    0.5536598563194275,
    -0.6420561671257019,
    -1.1009703874588013,
    0.2087959498167038,
    -0.1409958302974701,
    -0.9901217818260193,
    -0.4556649625301361
  ],
  "npu_logits": [
    0.40216585993766785,
    -1.0104314088821411,
    -0.8425863981246948,
    -0.7533591389656067,
    0.08871573954820633,
    -1.030056357383728,
    0.27582892775535583,
    -0.44227057695388794,
    -0.016189415007829666,
    -0.6671587228775024,
    -0.7628025412559509,
    0.5541954040527344,
    -0.6415854096412659,
    -1.1004947423934937,
    0.20933090150356293,
    -0.14049749076366425,
    -0.9896644949913025,
    -0.4551895558834076
  ],
  "cpu_probabilities": [
    0.5990671515464783,
    0.2667960524559021,
    0.3008818030357361,
    0.319986492395401,
    0.5220279693603516,
    0.26298221945762634,
    0.5683735609054565,
    0.3910801112651825,
    0.4958096742630005,
    0.339033305644989,
    0.31794166564941406,
    0.6349843144416809,
    0.34478187561035156,
    0.24955810606479645,
    0.552010178565979,
    0.4648093283176422,
    0.2708880305290222,
    0.38801470398902893
  ],
  "npu_probabilities": [
    0.5992079377174377,
    0.26689544320106506,
    0.30099034309387207,
    0.32008978724479675,
    0.5221644043922424,
    0.2630731761455536,
    0.5685233473777771,
    0.39120006561279297,
    0.4959527254104614,
    0.3391333222389221,
    0.31803810596466064,
    0.6351083517074585,
    0.34488824009895325,
    0.24964721500873566,
    0.5521425008773804,
    0.46493327617645264,
    0.2709783613681793,
    0.3881275951862335
  ]
}

CPU-NPU 一致性

{
  "max_abs_diff": 0.0006104409694671631,
  "mean_abs_diff": 0.0005070244272549947,
  "pearson_r": 0.999999998427053,
  "prob_max_abs_diff": 0.00014978647232055664,
  "prob_mean_abs_diff": 0.00011486974108265713,
  "finite_ratio": 1.0,
  "atol": 0.001,
  "rtol": 0.001,
  "passed": true
}

性能

{
  "first_latency_ms": 2.888868097215891,
  "avg_latency_ms": 2.896426897495985,
  "p50_latency_ms": 2.8967533726245165,
  "min_latency_ms": 2.869678195565939,
  "max_latency_ms": 2.913638949394226,
  "seq_per_s": 345.2529738846572,
  "bases_per_s": 345598.22685854184,
  "warmup": 3,
  "stable_iters": 10,
  "dtype": "float32",
  "batch_size": 1,
  "sequence_length": 1001
}

自验证截图

Agent workflow

NPU device call

Model result

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

已知限制

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

标签

#NPU #Ascend #Ascend910