w
gcw_uQ09W7jl/aimnet2-rxn-NPU
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

isayevlab/aimnet2-rxn on Ascend NPU

模型与任务

  • 模型:isayevlab/aimnet2-rxn
  • Revision:13e9de20a1e878a18a371e94dfb2176629281cb6
  • 适配路线:reaction-modeling
  • 设备:npu:0

环境依赖

{
  "torch": "2.9.0+cpu",
  "torch_npu_available": true,
  "device_name": "Ascend910_9362",
  "device_count": 2,
  "dtype": "float32",
  "model_dir": "model_cache",
  "aimnet": "0.2.0"
}

安装:pip install -r requirements.txt

NPU 推理

默认执行:python inference.py

真实输入

{
  "reaction": "C2H6O_isomerization_ethanol_to_DME",
  "reactant": {
    "formula": "C2H6O (ethanol)",
    "atoms": 9,
    "numbers": [
      6,
      6,
      8,
      1,
      1,
      1,
      1,
      1,
      1
    ],
    "sha256_coord": "a2abd62228d39183",
    "charge": 0.0,
    "coords_unit": "Å"
  },
  "product": {
    "formula": "C2H6O (DME)",
    "atoms": 9,
    "numbers": [
      6,
      8,
      6,
      1,
      1,
      1,
      1,
      1,
      1
    ],
    "sha256_coord": "2832825eb614ffbe",
    "charge": 0.0,
    "coords_unit": "Å"
  },
  "num_reactions": 1,
  "per_reaction_atoms": 9
}

真实推理结果

{
  "reactant_energy_cpu_eV": 0.560153596616864,
  "reactant_energy_npu_eV": 0.5672513314554708,
  "product_energy_cpu_eV": 1.483154602995008,
  "product_energy_npu_eV": 1.4927245243878455,
  "delta_cpu_eV": 0.923001006378144,
  "delta_npu_eV": 0.9254731929323747,
  "delta_cpu_kcal": 21.28486470758319,
  "delta_npu_kcal": 21.34187456561703,
  "charges_react_cpu": [
    -0.33859139680862427,
    0.060118455439805984,
    -0.5593947172164917,
    0.12343098223209381,
    0.0911051481962204,
    0.11477114260196686,
    0.06182720139622688,
    0.07640339434146881,
    0.37032973766326904
  ],
  "charges_react_npu": [
    -0.3397611975669861,
    0.06053472310304642,
    -0.5602608323097229,
    0.12372142821550369,
    0.09145607054233551,
    0.1149023175239563,
    0.061903346329927444,
    0.0765116885304451,
    0.37099236249923706
  ],
  "energy_units": "eV (learned AIMNet2-rxn scale, differences only)",
  "forces": "disabled (autograd NPU inplace issue, energies/charges validated)",
  "order_match": true
}

CPU-NPU 一致性

{
  "max_energy_abs_diff_eV": 0.009569921392837522,
  "max_energy_abs_diff_meV": 9.569921392837522,
  "max_energy_per_atom_meV": 1.0633245992041689,
  "delta_diff_eV": 0.0024721865542307597,
  "charges_react_max_diff_e": 0.0011698007583618164,
  "charges_react_mean_diff_e": 0.0004524211981333792,
  "charges_prod_max_diff_e": 0.0006123333005234599,
  "order_match": true,
  "energy_pass": true,
  "charges_pass": true,
  "passed": true,
  "atol_eV": 0.045,
  "atol_charges_e": 0.01
}

性能

{
  "avg_latency_ms": 18.692374229431152,
  "reactions_per_sec": 53.497751956276346,
  "atoms_per_sec": 962.9595352129743,
  "num_runs": 10,
  "dtype": "float32",
  "device": "npu:0",
  "per_reaction_atoms": 18
}

自验证截图

Agent workflow

NPU device call

Model result

已知限制

  • 仅对本次记录的模型 revision、输入契约、dtype 与 Ascend 环境完成验证。
  • AIMNet2-rxn 邻居列表与 D3 依赖 warp (CUDA only),NPU 侧通过 CPU 邻居计算+模型权重 NPU 前向混合执行;D3 以 needs_dispersion=False 禁用以避免 warp NPU 不兼容。
  • Forces 需要 autograd 在 NPU 上存在 inplace 版本冲突,本次以能量/电荷/排序为核心验收;forces 可在 CPU 侧单独验证为物理自洽。

标签

#NPU #Ascend #Ascend910