w
gcw_uQ09W7jl/cryofm-v2-910b
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

ByteDance-Seed/cryofm-v2 on Ascend NPU

模型与任务

  • 模型:ByteDance-Seed/cryofm-v2
  • Revision:4e308f7f028af46ca2c7ee5af81e29775bc370dd
  • 适配路线:cryo-em-density
  • 设备:npu:0

环境依赖

{
  "torch": "2.9.0+cpu",
  "torch_npu_available": true,
  "device_name": "Ascend910_9362",
  "device_count": 2,
  "torch_npu": "2.9.0.post1+gitee7ba04",
  "diffusers": "0.40.0.dev0"
}

安装:pip install -r requirements.txt

NPU 推理

默认执行:python inference.py

真实输入

{
  "batch_size": 1,
  "side_shape": 64,
  "in_channels": 2,
  "out_channels": 1,
  "input_shape": [
    1,
    2,
    64,
    64,
    64
  ],
  "timestep": 500,
  "timestep_shape": [
    1
  ],
  "dtype": "torch.float32",
  "seed": 42,
  "sha256": "b9b79899805e76f2",
  "voxel_count": 262144,
  "task": "cryo-em density generation (flow matching)",
  "variant": "cryofm2-pretrain"
}

真实推理结果

{
  "output_shape": [
    1,
    1,
    64,
    64,
    64
  ],
  "dtype": "float32",
  "output_stats": {
    "mean": 0.0018927915953099728,
    "std": 1.3281530141830444,
    "min": -6.390800952911377,
    "max": 5.3856682777404785
  },
  "cpu_stats": {
    "mean": 0.002033529570326209,
    "std": 1.3281656503677368
  },
  "device_proof": "first_param:npu:0, output:npu:0, input:npu:0",
  "timestep": 500
}

CPU-NPU 一致性

{
  "atol": 0.02,
  "rtol": 0.02,
  "max_abs_diff": 0.01571822166442871,
  "mean_abs_diff": 0.0002376549382461235,
  "rmse": 0.00031401155865751207,
  "passed": true,
  "pearson": 0.999999977711171,
  "shape": [
    1,
    1,
    64,
    64,
    64
  ],
  "elements": 262144
}

性能

{
  "first_run_ms": 328.1130790710449,
  "second_run_ms": 85.0074291229248,
  "avg_ms": 85.25664806365967,
  "min_ms": 85.06107330322266,
  "max_ms": 85.46781539916992,
  "p50_ms": 85.20889282226562,
  "p90_ms": 85.40730476379395,
  "throughput_volumes_per_s": 11.729290591547972,
  "throughput_voxels_per_s": 3074763.1528307516,
  "batch_size": 1,
  "side_shape": 64,
  "dtype": "float32"
}

自验证截图

Agent workflow

NPU device call

Model result

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

已知限制

  • 仅对本次记录的模型 revision、输入契约、dtype 与 Ascend 环境完成验证。
  • 固定 64x64x64 体素窗口,非可变尺寸;大体积需分块推理。
  • 单步 UNet 前向一致性,非完整 200 步采样链路。

标签

#NPU #Ascend #Ascend910