m
mengsihan/aparent2
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

multimolecule/aparent2 on Ascend NPU

模型与任务

  • 模型:multimolecule/aparent2
  • Revision:7ce086836126386421cb9f277c25461bdc6a1b7a
  • 适配路线:polyadenylation
  • 设备:npu:0

环境依赖

{
  "python": "3.11.14",
  "torch": "2.9.0+cpu",
  "torch_npu": "2.9.0.post1",
  "device_name": "Ascend910_9362",
  "device_count": 2,
  "cann": "8.5.1",
  "platform": "Linux-5.10.0-182.0.0.95.r2220_156.hce2.aarch64-aarch64-with-glibc2.35"
}

安装:pip install -r requirements.txt

NPU 推理

默认执行:python inference.py

真实输入

{
  "sequence_length": 205,
  "alphabet": "ACGUN (streamline RNA), T->U",
  "reference_seq": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
  "reference_sha256": "c04a456284ac1eb2967c195dd2993d489d2a377ab1a83e943fc491814ffd2e1c",
  "alt_seq": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
  "alt_sha256": "3c757a9c44bcad6613545cf3b50b50c1b9c316e01dc12b96f2aa14802761de9b",
  "hexamer_position": 70,
  "vocab_mapping": {
    "A": 0,
    "C": 1,
    "G": 2,
    "U": 3,
    "N": 4
  },
  "input_ids_shape": [
    1,
    205
  ],
  "dtype": "float32",
  "batch": 1
}

真实推理结果

{
  "logits_shape": [
    1,
    206
  ],
  "logits_dtype": "float32",
  "prob_sum": 1.0,
  "cleavage_profile_range": "206 positions (205 + no_cleavage)",
  "isoform_usage_ref": 0.077776,
  "isoform_usage_alt": 0.015995,
  "delta_logodds": -1.646415,
  "cleavage_prob_max": 0.755403,
  "cleavage_prob_max_pos": 73
}

CPU-NPU 一致性

{
  "logits_max_abs_diff": 0.006558,
  "logits_mean_abs_diff": 0.002614,
  "prob_max_abs_diff": 0.000144,
  "prob_mean_abs_diff": 2e-06,
  "isoform_ref_diff": 6.4e-05,
  "isoform_alt_diff": 1e-06,
  "delta_logodds_diff": 0.000977,
  "threshold_logits_atol": 0.01,
  "threshold_prob_atol": 0.001,
  "threshold_iso_atol": 0.001,
  "passed": true
}

性能

{
  "first_inference_ms": 6.25,
  "stable_avg_ms": 6.12,
  "throughput_seq_per_s": 163.47,
  "throughput_bases_per_s": 33511.01,
  "batch": 1,
  "sequence_length": 205,
  "dtype": "float32",
  "warmup_iters": 3,
  "stable_iters": 10,
  "device": "npu:0",
  "peak_memory_mb": 3212
}

自验证截图

Agent workflow

NPU device call

Model result

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

已知限制

  • 仅对本次记录的模型 revision、输入契约、dtype 与 Ascend 环境完成验证。
  • 单序列 smoke consistency,不代表全数据集评估。

标签

#NPU #Ascend #Ascend910