jsjs1258/framepool
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

multimolecule/framepool on Ascend NPU

模型与任务

  • 模型:multimolecule/framepool
  • Revision:main
  • 适配路线:utr-translation
  • 设备:npu:0

环境依赖

{
  "torch_version": "2.9.0+cpu",
  "torch_npu_available": true,
  "npu_device_count": 2,
  "npu_device_name": "Ascend910_9362",
  "transformers_version": "5.9.0",
  "model_dir_exists": "True"
}

安装:pip install -r requirements.txt

NPU 推理

默认执行:python inference.py

真实输入

{
  "sequences": [
    {
      "source": "NRAS_5UTR_model_card",
      "length": 131,
      "sha256": "085ce6d59b446cef",
      "preview": "GGGGCCGGAAGUGCCGCUCCUUGGUGGGGGCUGUUCAUGG..."
    },
    {
      "source": "APP_5UTR_model_card",
      "length": 150,
      "sha256": "d8fc5fecb6e91ff9",
      "preview": "GUCAGUUUCCUCGGCAGCGGUAGGCGAGAGCACGCGGAGG..."
    },
    {
      "source": "synthetic_50nt",
      "length": 53,
      "sha256": "4d869d6322a390e2",
      "preview": "GGGAGACGGCGGCGGUGGCGGCGCGGGCAGAGCAAGGACG..."
    }
  ],
  "total_sequences": 3,
  "total_bases": 334,
  "tokenizer": "RnaTokenizer",
  "alphabet": "A/C/G/U/N",
  "replace_T_with_U": true,
  "padding": "max_length per batch",
  "input_ids_shape": [
    3,
    150
  ]
}

真实推理结果

{
  "output_type": "MRL scalar (mean ribosome load) per 5'UTR, regression",
  "logits_shape": [
    3,
    1
  ],
  "logits_dtype": "float32",
  "mrl_values_npu": [
    6.632907390594482,
    5.776164531707764,
    5.098484516143799
  ],
  "mrl_values_cpu": [
    6.632876873016357,
    5.776196479797363,
    5.0983781814575195
  ]
}

CPU-NPU 一致性

{
  "max_abs_diff": 0.00010633468627929688,
  "mean_abs_diff": 5.626678466796875e-05,
  "pearson": 1.0,
  "tolerance": 0.01,
  "dtype": "float32"
}

性能

{
  "device": "npu:0",
  "first_latency_ms": 2.36,
  "avg_latency_ms": 2.27,
  "throughput_seq_per_s": 1321.72,
  "throughput_bases_per_s": 147151.25,
  "batch_size": 3,
  "dtype": "float32",
  "warmup_iters": 3,
  "stable_iters": 10,
  "peak_memory_mb": 2.4
}

自验证截图

Agent workflow

NPU device call

Model result

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

已知限制

  • 仅对本次记录的模型 revision、输入契约、dtype 与 Ascend 环境完成验证。
  • MRL 指标为单点回归值;完整数据集评估需额外任务数据。

标签

#NPU #Ascend #Ascend910