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

multimolecule/scbasset on Ascend NPU

模型与任务

  • 模型:multimolecule/scbasset
  • Revision:ce1cc2bc0ceb24c7d11919a6308411715a240186
  • 适配路线:regulatory-sequence
  • 设备:npu:0

环境依赖

{
  "python": "3.11.14",
  "torch": "2.9.0+cpu",
  "torch_npu": "2.9.0.post1+gitee7ba04",
  "transformers": "5.9.0",
  "multimolecule": "unknown",
  "numpy": "2.4.6",
  "device_name": "Ascend910_9362",
  "npu_count": 2
}

安装:pip install -r requirements.txt

NPU 推理

默认执行:python inference.py

真实输入

{
  "num_sequences": 6,
  "names": [
    "TP53",
    "BRCA1",
    "HBB",
    "CFTR",
    "TERT",
    "KRAS"
  ],
  "sequence_length": 1344,
  "real_bp_per_sequence": [
    184,
    99,
    142,
    192,
    331,
    122
  ],
  "alphabet": "ACGTN",
  "source": "model-card regulatory-activity widget examples (human gene promoters)",
  "sha256": "d3a1f01ca14299b47b25f7dcb85b34977e509053d0d503f98c4dbdf6e8384bff"
}

真实推理结果

{
  "logits_shape": [
    6,
    2034
  ],
  "num_cell_types": 2034,
  "logits_min": -9.579202651977539,
  "logits_max": 0.3778146505355835,
  "logits_mean": -3.948624610900879,
  "mean_regulatory_activity": 0.03457044064998627,
  "mean_predicted_cell_accessibility": 0.0004916421021334827,
  "max_cell_prob": 0.5933458805084229
}

CPU-NPU 一致性

{
  "passed": true,
  "shape": [
    6,
    2034
  ],
  "elements": 12204,
  "max_abs_diff": 0.004064321517944336,
  "mean_abs_diff": 0.0005115516250953078,
  "atol": 0.01,
  "rtol": 0.01
}

性能

{
  "batch": 6,
  "sequence_length": 1344,
  "warmup_iterations": 3,
  "stable_iterations": 10,
  "stable_elapsed_seconds": 0.026317636016756296,
  "seconds_per_iteration": 0.0026317636016756295,
  "sequences_per_s": 2279.8400267333404,
  "bases_per_s": 3064104.99592961,
  "dtype": "torch.float32",
  "device": "npu:0"
}

自验证截图

Agent workflow

NPU device call

Model result

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

已知限制

  • Verification used the 6 human DNA examples from the model card, padded with N to the fixed 1344 bp contract.
  • Results are smoke-consistency on this revision and input set; full AUROC/AUPRC on the Buenrostro2018 atlas labels is out of scope.
  • FP32 precision on Ascend 910B; CPU-NPU max logits diff 0.01 tolerance.

标签

#NPU #Ascend #Ascend910