gcw_6a3w2yXz/compressionkit-ppg-2x-v1.0-NPU
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

Ambiq/compressionkit-ppg-2x-v1.0 on Ascend NPU

模型与任务

  • 模型:Ambiq/compressionkit-ppg-2x-v1.0
  • Revision:af00d62fcdd8e8c12a2929bae9d22911ab518966
  • 适配路线:biosignal-compression
  • 设备:npu:0 Ascend910_9362

环境依赖

{
  "torch": "2.9.0+cpu",
  "torch_npu": "2.9.0.post1+gitee7ba04",
  "cann": "8.5.1",
  "python": "3.11",
  "npu_driver": "25.5.5"
}

安装:pip install -r requirements.txt

NPU 推理

默认执行:python inference.py

真实输入

{
  "signal": "real BIDMC PPG and Respiration v1.0 recordings (ODC-By-1.0), shipped as official demo_recordings.npz",
  "sample_rate_hz": 64,
  "frame_size": 320,
  "channels": 1,
  "frames": 60,
  "recordings": 10,
  "normalization": "per-frame layer norm, eps=1e-3, inverse applied after decode",
  "input_sha256_prefix": "ee8f4eeb5314acac"
}

真实推理结果

{
  "reconstruction_shape": [
    60,
    320
  ],
  "compression_ratio": "2x (latent 160 positions, RVQ 4 levels x 256 x 16)",
  "PRD_percent_mean": 0.3357,
  "PRD_percent_p90": 0.5589,
  "SNR_dB_mean": 50.42,
  "PSNR_dB_mean": 49.16
}

CPU-NPU 一致性

{
  "cpu_vs_npu_recon_prd_percent_max": 0.2669,
  "cpu_vs_npu_mean_abs_diff": 6.58e-05,
  "rvq_index_agreement": 0.990755,
  "criteria": "float32 cross-device equivalence: recon-vs-recon PRD<=1%, mean_abs_diff<=1e-4, RVQ index agreement>=98%; index flips near codebook decision boundaries are inherent to argmin under ~1e-6 latent perturbation",
  "port_vs_official_runtime": "latent max diff 1e-6, RVQ indices 38400/38400 identical, reconstruction max abs diff 1e-6"
}

性能

{
  "warmup_runs": 3,
  "timed_runs": 12,
  "stable_seconds_per_run": 0.004989766088935236,
  "windows_per_s": 12024.6,
  "samples_per_s": 3847875.8,
  "window_length": 320,
  "dtype": "float32",
  "peak_mem_mb": 312.64
}

自验证截图

Agent workflow

NPU device call

Model result

已知限制

  • 仅对固定 revision af00d62fcdd8e8c12a2929bae9d22911ab518966、float32 部署链路(encoder_float32 + codebook.npz + decoder_float32 等价 PyTorch 实现)与 Ascend910 环境完成验证。
  • 单条/少量真实信号的一致性为 smoke consistency;quality_scorecard 的完整评测在其自有数据集上完成。
  • RVQ 最近邻在码本决策边界处存在跨设备索引翻转(约 0.9%),已由重建 PRD<=1% 的任务级等价性判据覆盖。

标签

#NPU #Ascend #Ascend910