liucu/multimolecule-a2zchromatin-accessibility-NPU
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

multimolecule/a2zchromatin-accessibility on Ascend NPU

模型与任务

  • 模型:multimolecule/a2zchromatin-accessibility
  • Revision:3104d2727928634a2bf7270fa1484d5cc2acb278
  • 适配路线:regulatory-sequence
  • 设备:npu:0

环境依赖

{
  "torch": "2.9.0+cpu",
  "torch_npu": "2.9.0.post1",
  "device_name": "Ascend910_9362",
  "device_count": 2,
  "python": "3.11.14",
  "cann": "8.5.1",
  "model_dir": "/tmp/models/a2zchromatin-accessibility",
  "dtype": "float32"
}

安装:pip install -r requirements.txt

NPU 推理

默认执行:python inference.py

真实输入

{
  "alphabet": "DNA IUPAC A/C/G/T/N/R/Y/S/W/K/M/B/D/H/V/. (16 tokens)",
  "strand": "5'->3'",
  "sequence_length": 600,
  "vocab_size": 16,
  "batch": 1,
  "primary_sequence": "ACGT*150 (600 bp synthetic)",
  "primary_sha256": "e4a387752a4865282071c8f2f26b4d990db42b00a357a5080766f61ba6f02dbd",
  "p53_sequence_preview": "ACTCCCCTGCCCTCAACAAGATGTTTTGCCAACTGGCCAAGACCTGCCCTGTGCAGCTGTGGGTTGATTCCACACCCCCGCCCGGCACCCGCGTCCGCGCCATGGCCATCTACAAGCAGTCACAGCACATGACGGAG",
  "p53_sha256": "7a04b9f182884881e3dc7870767e85cf13f1ef93901512f927ca48ef8271903d",
  "p53_len": 184,
  "padded_with": "'.' id 15, attention_mask 0 for pad",
  "species": "angiosperm cross-species (Arabidopsis/maize etc)",
  "tokenizer": "DnaTokenizer IUPAC",
  "dtype": "float32",
  "source": "synthetic 600 bp + p53 widget example padded to 600"
}

真实推理结果

{
  "logits_shape": [
    1,
    1
  ],
  "logits_dtype": "float32",
  "logits_device": "npu:0",
  "prob_synth": 0.2333710938692093,
  "prob_gc": 0.0001234627270605415,
  "prob_at": 0.00016015989240258932,
  "prob_p53": 0.03312794119119644,
  "prob_iupac": 0.003132625250145793,
  "logits_synth": -1.1894,
  "logits_gc": -9.0,
  "threshold_hint": "sigmoid 0.5 binary accessibility",
  "problem_type": "binary",
  "num_labels": 1
}

CPU-NPU 一致性

{
  "passed": true,
  "shape": [
    1,
    1
  ],
  "elements": 1,
  "max_abs_diff": 0.0004254579544067383,
  "mean_abs_diff": 0.0004254579544067383,
  "atol": 0.001,
  "rtol": 0.001
}

性能

{
  "avg_ms": 2.01,
  "p50_ms": 2.01,
  "min_ms": 1.93,
  "max_ms": 2.06,
  "seq_per_s": 498.62,
  "bases_per_s": 299174.7,
  "input_length": 600,
  "batch_size": 1,
  "dtype": "float32",
  "device": "npu:0",
  "warmup": 3,
  "stable_runs": 10,
  "peak_memory_mb": 3236
}

自验证截图

Agent workflow

NPU device call

Model result

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

已知限制

  • 仅对本次记录的模型 revision、输入契约、dtype 与 Ascend 环境完成验证。
  • 长序列 600 bp 单窗口 smoke consistency;完整精度评测需任务数据集。

标签

#NPU #Ascend #Ascend910