Ambiq/compressionkit-ecg-2x-v1.04d07900f24978ee3830ee2a6a4e2becaa0880645biosignal-compressionnpu:0{
"soc": "Ascend910_9362",
"torch": "2.9.0+cpu",
"torch_npu": "2.9.0.post1+gitee7ba04",
"python": "3.11.14",
"cann": "8.5.1",
"device_count": 2
}安装:pip install -r requirements.txt
默认执行:python inference.py
{
"source": "MIT-BIH Arrhythmia Database record 219 (via official demo_recordings.npz, ODC-By-1.0)",
"start_seconds": 657.7722222222222,
"sample_rate_hz": 256,
"window_samples": 512,
"dtype": "float32",
"frame_sha256": "b2745021e277617ea000498cc08e54f59a8eac7acab07c47505422fd0667b6cb",
"normalization": "per_frame_layer_norm(mean, sqrt(var+1e-3))",
"mean": -0.941533,
"std": 0.479822
}{
"latent_shape": [
1,
16,
1,
256
],
"rvq_indices_levels": 4,
"index_bytes_per_frame": 1024,
"uniform_byte_ratio": "2048/1024 = 2.0:1",
"reconstruction_shape": [
1,
1,
1,
512
],
"prd_vs_input_raw_pct": 0.7491,
"snr_db": 42.51,
"cosine_normalized": 0.99986433
}{
"baseline": "PyTorch float32 port on CPU vs same weights on npu:0, identical signal/preprocessing/seed",
"recon_max_abs_diff": 0.008339762687683105,
"recon_mean_abs_diff": 0.0002696468109206762,
"recon_cosine_cpu_vs_npu": 0.9999996736,
"rvq_index_agreement_per_level": [
1.0,
1.0,
0.984375,
0.984375
],
"prd_raw_cpu_pct": 0.7456,
"prd_raw_npu_pct": 0.7491,
"prd_delta_pp": 0.0035,
"thresholds": {
"max_abs_diff": 0.02,
"mean_abs_diff": 0.0005,
"cosine": 0.9999,
"prd_delta_pp": 0.05,
"note": "thresholds fixed from measured float32 baseline before final validation; normalized-domain recon has unit std"
},
"official_tflite_parity": {
"encoder_max_abs_diff": 1.46e-06,
"decoder_max_abs_diff": 1.43e-06
}
}{
"first_call_ms": 1.39,
"warmup_iters": 3,
"timed_iters": 20,
"steady_ms_per_window": 1.441,
"windows_per_s": 693.9,
"samples_per_s": 355259,
"peak_npu_mem_mib": 16.21,
"timing_note": "torch.npu.synchronize() before/after timed region; first-call (graph compile) reported separately"
}


#NPU #Ascend #Ascend910