w
gcw_uQ09W7jl/compressionkit-ppg-4x
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

Ambiq/compressionkit-ppg-4x on Ascend NPU

模型与任务

  • 模型:Ambiq/compressionkit-ppg-4x
  • Revision:8e3b465983808d50d99799df6135aaffe68029ff
  • 适配路线:biosignal-compression
  • 设备:npu:0

环境依赖

{
  "torch": "2.9.0+cpu",
  "torch_npu_available": true,
  "device_name": "Ascend910_9362",
  "sample_rate": 64,
  "frame_size": 320,
  "compression_ratio": 4
}

安装:pip install -r requirements.txt

NPU 推理

默认执行:python inference.py

真实输入

{
  "shape": [
    10,
    1,
    320,
    1
  ],
  "dtype": "float32",
  "sample_rate": 64,
  "frame_size": 320,
  "window_samples": 320,
  "channels": 1,
  "source": "sample_stimulus.npz inputs[0]",
  "min": -2.819572687149048,
  "max": 3.298578977584839
}

真实推理结果

{
  "shape": [
    1,
    1,
    320,
    1
  ],
  "dtype": "float32",
  "min": -1.783666729927063,
  "max": 2.28409743309021,
  "reconstruction_prd_pct": 0.958331860601902
}

CPU-NPU 一致性

{
  "max_abs_diff": 0.007940053939819336,
  "mean_abs_diff": 0.0002693181813810952,
  "atol": 0.1,
  "rtol": 0.01,
  "passed": true
}

性能

{
  "npu_avg_ms_per_batch": 3.1018972396850586,
  "windows_per_second": 3223.8334242869114,
  "single_window_ms": 1.5462398529052734,
  "batch_size": 10,
  "dtype": "float32",
  "device": "npu:0"
}

自验证截图

Agent workflow

NPU device call

Model result

已知限制

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

标签

#NPU #Ascend #Ascend910