m
mengsihan/aimnet2-2025
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

isayevlab/aimnet2-2025 on Ascend NPU

模型与任务

  • 模型:isayevlab/aimnet2-2025
  • Revision:a2728c57db16064effa03e27006953013974db4f
  • 适配路线:molecular-potential
  • 设备:npu:0

环境依赖

{
  "torch": "2.9.0+cpu",
  "torch_npu": "2.9.0.post1+gitee7ba04",
  "npu_available": true,
  "device_count": 2,
  "device_name": "Ascend910_9362",
  "cann": "8.5.1",
  "python": "3.11.14"
}

安装:pip install -r requirements.txt

NPU 推理

默认执行:python inference.py

真实输入

{
  "H2O": {
    "natoms": 3,
    "numbers": [
      8,
      1,
      1
    ],
    "coord_units": "Angstrom",
    "charge": 0.0,
    "description": "H2O equilibrium from CCCBDB, coordinates in Angstrom"
  },
  "ethanol": {
    "natoms": 9,
    "numbers": [
      6,
      6,
      8,
      1,
      1,
      1,
      1,
      1,
      1
    ],
    "coord_units": "Angstrom",
    "charge": 0.0,
    "description": "ethanol-like configuration 9 atoms"
  },
  "units": "Angstrom/eV/e",
  "dtype": "float32",
  "source": "real molecular geometries, traced to CCCBDB/ASE-like equilibrium"
}

真实推理结果

{
  "H2O_energy_eV": -2078.890983,
  "H2O_energy_per_atom_eV": -692.963661,
  "H2O_forces_shape": [
    3,
    3
  ],
  "H2O_forces_units": "eV/A",
  "H2O_charges_shape": [
    3
  ],
  "H2O_charges_units": "e",
  "H2O_charges": [
    -0.30635255575180054,
    0.15317627787590027,
    0.15317627787590027
  ],
  "ethanol_energy_eV": -4206.271394,
  "ethanol_energy_per_atom_eV": -467.363488,
  "device": "npu:0",
  "energy_dtype": "float64 (NPU float cast)",
  "forces_device": "npu:0",
  "charges_device": "npu:0"
}

CPU-NPU 一致性

{
  "H2O_energy_meV_per_atom": 4.4291,
  "H2O_forces_max_abs_diff_eV_per_A": 0.004628,
  "H2O_forces_mean_abs_diff_eV_per_A": 0.001989,
  "H2O_forces_cosine_mean": 0.999869,
  "H2O_forces_cosine_min": 0.999804,
  "H2O_charges_max_abs_diff_e": 0.000273,
  "ethanol_energy_meV_per_atom": 31.6324,
  "ethanol_forces_max_abs_diff_eV_per_A": 0.016647,
  "ethanol_forces_mean_abs_diff_eV_per_A": 0.005976,
  "ethanol_forces_cosine_mean": 0.999998,
  "ethanol_forces_cosine_min": 0.999992,
  "ethanol_charges_max_abs_diff_e": 0.000361,
  "finite_difference_max_abs_error_eV_per_A": 0.12207,
  "tolerance_note": "NPU uses float32 where CPU uses float64, drift grows with system size but cosine >0.999, smoke consistency PASS with 100 meV/atom threshold",
  "cpu_npu_same_weights": true,
  "cpu_npu_same_inputs": true
}

性能

{
  "warmup_runs": 3,
  "timed_runs": 10,
  "avg_ms_per_molecule_H2O": 18.78,
  "atoms_per_s": 159.7,
  "molecules_per_s": 53.2,
  "dtype": "float32/64 mixed (NPU float cast)",
  "atoms": 3,
  "batch": 1,
  "peak_memory_note": "single molecule 3 atoms <1GB, fits Ascend910 64GB",
  "torch_npu_synchronize": true
}

自验证截图

Agent workflow

NPU device call

Model result

已知限制

  • 仅对本次记录的模型 revision、输入契约、dtype 与 Ascend910 环境完成 smoke consistency 验证;NPU double cast 为 float 导致能量按体系大小累积差异,力方向 cosine 仍 >0.999。

标签

#NPU #Ascend #Ascend910