m
mengsihan/maxentscan-score3
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

multimolecule/maxentscan-score3 on Ascend NPU

模型与任务

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

环境依赖

{
  "python": "3.11.14",
  "torch": "2.9.0+cpu",
  "torch_npu": "2.9.0.post1+gitee7ba04",
  "npu_name": "Ascend910_9362",
  "npu_count": 2,
  "cann": "/usr/local/Ascend/cann-8.5.1"
}

安装:pip install -r requirements.txt

NPU 推理

默认执行:python inference.py

真实输入

{
  "n_windows": 21,
  "window": 23,
  "alphabet": "ACGU",
  "strand": "5'->3'",
  "species_source": "model card widget real transcripts (ncRNA/mRNA/5'UTR/3'UTR/viral)",
  "acceptor_consensus": "AG at 0-based positions 18,19",
  "tokenizer": "RnaTokenizer(add_special_tokens=False)",
  "input_sha256": "ecb452f6d1a5a2e93ae77a18afdd3620a9667a4f0c009200c5d7d1c0558b849f"
}

真实推理结果

{
  "output_name": "logits",
  "shape": [
    21,
    1
  ],
  "dtype": "torch.float32",
  "device": "cpu",
  "score_mean": -2.3344333171844482,
  "score_std": 7.239171981811523,
  "score_min": -20.09734535217285,
  "score_max": 10.317978858947754,
  "top_site": "activating transcription factor 4"
}

CPU-NPU 一致性

{
  "max_abs_diff": 4.76837158203125e-07,
  "mean_abs_diff": 3.725290298461914e-08,
  "pearson": 1.0,
  "spearman_rank": 1.0,
  "top_site_rank_agreement": true,
  "atol": 0.0001,
  "rtol": 0.0001,
  "allclose": true
}

性能

{
  "warmup_iterations": 3,
  "stable_iterations": 10,
  "mean_ms_per_batch": 2.9217869509011507,
  "sequences_per_s": 7187.382363222303,
  "input_length": 23,
  "batch_size": 21,
  "dtype": "torch.float32",
  "peak_memory_mb": 0.3408203125
}

自验证截图

Agent workflow

NPU device call

Model result

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

已知限制

  • MaxEntScan score3 accepts exactly one fixed 23-nt RNA window (ACGU) per row; longer transcripts must be windowed.
  • Model has no trainable weights; scores are read from the fixed Yeo & Burge (2004) maximum-entropy tables.
  • Verified on the pinned revision and this Ascend 910B environment; float32 throughout.

标签

#NPU #Ascend #Ascend910