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

multimolecule/optimus5prime on Ascend NPU

模型与任务

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

环境依赖

{
  "torch": "2.9.0",
  "torch_npu": "2.9.0.post1",
  "cann": "8.5.1",
  "npu_name": "Ascend910_9362",
  "device_count": 2
}

安装:pip install -r requirements.txt

NPU 推理

默认执行:python inference.py

真实输入

{
  "alphabet": "RNA A/C/G/U/N",
  "sequence_length": 50,
  "vocab_size": 5,
  "tokenizer": "RnaTokenizer",
  "fixtures": 5,
  "example_sequence": "GGGGCCGGAAGUGCCGCUCCUUGGUGGGGGCUGUUCAUGGCGGUUCCGGG",
  "example_sha256": "992eeba3372e7a30"
}

真实推理结果

{
  "task": "mean-ribosome-load regression",
  "output_shape": "[1, 1]",
  "output_name": "logits",
  "scale": "standardized MRL",
  "example_outputs": {
    "NRAS_UTR_50": -1.308528,
    "MYC_UTR_50": 0.542048,
    "FMR1_UTR_50": 0.427745,
    "PolyA_50": 1.196788,
    "GC_rich_50": -0.888177
  }
}

CPU-NPU 一致性

{
  "max_abs_diff": 4.858e-05,
  "threshold": 0.0005,
  "metric": "abs_diff",
  "dtype": "float32",
  "comparison": "CPU logits vs NPU logits (same weights, same sequences)"
}

性能

{
  "warmup": 3,
  "iters": 10,
  "sequence_length": 50,
  "batch_size": 1,
  "avg_ms_per_seq": 1.24,
  "seq_per_s": 805.91,
  "bases_per_s": 40295.7,
  "dtype": "float32",
  "device": "npu:0"
}

自验证截图

Agent workflow

NPU device call

Model result

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

已知限制

  • 仅对本次记录的模型 revision、输入契约、dtype 与 Ascend 环境完成验证。

标签

#NPU #Ascend #Ascend910