gcw_6a3w2yXz/ByteDance-Seed-cryofm-v2-NPU
模型介绍
文件和版本
Pull Requests
讨论
分析

ByteDance-Seed/cryofm-v2 在昇腾 NPU 上

模型与任务

  • 模型:ByteDance-Seed/cryofm-v2
  • 版本:4e308f7f028af46ca2c7ee5af81e29775bc370dd
  • 适配路线:density-map
  • 设备:npu:0

环境依赖

{
  "npu": "Ascend910B (Ascend910_9362), Atlas 800T A2, 64 GB HBM",
  "driver": "npu-smi 25.5.5",
  "torch": "2.9.0+cpu",
  "torch_npu": "2.9.0.post1+gitee7ba04",
  "cann": "8.5.1",
  "python": "3.11"
}

安装:pip install -r requirements.txt

NPU 推理

默认运行:python inference.py

真实输入

{
  "source": "EMDB EMD-11649 beta-galactosidase cryo-EM map (real data)",
  "fixture_sha256_float32": "d7a2b33dc9c3fc789cff13adf46b7d96474c9e734c6da539ad3b3ffb3436a9fa",
  "preprocessing": "Fourier resample 1.85A -> 1.5A (official resize_by_voxel_size), center 64^3 crop, official maxvalue normalization (percentile 99.999, mean 0.04, std 0.09)",
  "box": "64x64x64 voxels @ 1.5 A (96 A field of view), fp32, vol_cond conditioning + style tag 0",
  "voxels": 262144
}

真实推理结果

{
  "shape": [
    1,
    64,
    64,
    64
  ],
  "dtype": "float32",
  "finite_ratio": 1.0,
  "stats_50step_cfg_run": {
    "min": -0.4833,
    "max": 11.1772,
    "mean": 0.0173,
    "std": 1.3416
  },
  "saved_as": "cryo-EM enhanced density map (.mrc, 1.5 A voxel size)"
}

CPU-NPU 一致性

{
  "protocol": "same local weights, same seeded inputs (noise generated once on CPU and copied to device), same preprocessing and dtype; forward pass at t=500 conditioned on the real patch; full 25-step euler ODE sampling endpoints compared on both devices",
  "emready_forward_max_abs_diff": 0.028199434280395508,
  "emready_forward_mean_abs_diff": 0.000937688356568156,
  "pretrain_forward_max_abs_diff": 0.009545564651489258,
  "pretrain_forward_mean_abs_diff": 0.0003439055258080692,
  "sampled_endpoint_emready_max_abs_diff": 0.3604156970977783,
  "sampled_endpoint_emready_mean_abs_diff": 0.000546153757112311,
  "valid_voxel_mask_mean_abs_diff": 0.0006212271961668053,
  "valid_voxel_mask_p999_abs_diff": 0.030581674575805715,
  "valid_voxel_mask_cosine": 0.9999979010241073,
  "sampled_endpoint_pretrain_max_abs_diff": 0.01567983627319336,
  "verdict": "PASS - density-map route acceptance met (masked cosine >= 0.999); residual differences are fp32 kernel reduction-order noise accumulated through ODE integration"
}

性能

{
  "timing": "torch.npu.synchronize() bracketed, 3 warmup + 10 timed runs, batch=1 box",
  "emready_boxes_per_s": 5.882,
  "emready_mvxels_per_s": 1.54,
  "emready_peak_memory_MB": 2368.7,
  "pretrain_boxes_per_s": 11.738,
  "pretrain_mvxels_per_s": 3.077,
  "sampling_wall_s_50steps_cfg": 8.82,
  "dtype": "float32"
}

自验证截图

智能体工作流

NPU 设备调用

模型结果

已知限制

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

标签

#NPU #Ascend #Ascend910