ruv/ruview472cfbe8482403256d45f4acb0aed1a5f0db41becsi-encoding (WiFi CSI → 128-dim 感知嵌入, presence 检测, 可扩展 Wiflow 姿态)npu:0 (Ascend910_9362)asr (实际为 WiFi 感知编码, 按 npu-adapt-signal 的 csi-encoding 路由实现; 已在 NPU 上验证){
"python": "3.11.14",
"torch": "2.9.0+cpu",
"torch_npu": "2.9.0.post1+gitee7ba04",
"cann": "8.5.1",
"device": "Ascend910_9362",
"device_count": 2,
"npu_available": true
}安装:pip install -r requirements.txt
默认执行:python inference.py
可选参数:--model-dir /data/adapt-npu-agent/hf/cache/ruv_ruview --device npu:0
脚本从本地 model_dir 加载 model.safetensors (48KB) 与 wiflow-v1/wiflow-v1.json (974KB), 均显式迁移到 npu:0, 输入/输出 Tensor 同步校验 device, 计时前后调用 torch.npu.synchronize().
{
"csi_encoding_input": {
"shape": [1, 8],
"dtype": "float32",
"sampling": "synthetic CSI features @1Hz, seed 42, scale 0.5",
"values_sample": [0.2483, -0.0691, 0.3238, 0.7615]
},
"wiflow_input": {
"shape": [1, 35, 20],
"dtype": "float32",
"description": "CSI amplitude matrix, 35 subcarriers x 20 time steps, rand [0,1]"
},
"quantization": "4-bit default (model-q4.bin 8KB) documented, full precision used for NPU parity"
}{
"output_emb_shape": [1, 128],
"output_emb_sample": [71.074798, -123.797943, -28.56604, 37.443977, 43.146385],
"presence_prob": 0.0,
"presence_threshold": 0.3,
"presence_label": "empty",
"device": "npu:0",
"consistency": {
"max_abs_diff": 2.3e-05,
"mean_abs_diff": 4e-06,
"cosine_sim": 1.0,
"pass": true,
"threshold": "cos >=0.999, max_diff <1e-3"
},
"timing": {
"avg_ms": 3.076,
"min_ms": 0.865,
"max_ms": 22.347,
"throughput_windows_per_sec": 325.1,
"batch": 1,
"window_sec": 1,
"note": "includes first compile ~22ms, stable ~0.9ms"
},
"wiflow_pose": "load warning shape mismatch (flat weights vs arch), not required for csi-encoding PASS; encoder route verified"
}原始 NPU 日志见 model_result.png, 包含完整环境、设备证明、同步计时与 PASS 标记。
{
"route": "csi-encoding",
"input": "same 1x8 CSI vector, same weights, same dtype float32",
"cpu_emb_sample": [71.074806, -123.797943, -28.566034],
"npu_emb_sample": [71.074798, -123.797943, -28.56604],
"max_abs_diff": 2.3e-05,
"mean_abs_diff": 4e-06,
"cosine": 1.0,
"pass": true,
"method": "torch.nn.functional.cosine_similarity, synchronize before timing"
}单条信号仅称为 smoke consistency, 不称完整任务评测。已按 task-adaptation.md 的 csi-encoding 指标 (cosine >=0.999) 验收。
{
"avg_latency_ms": 3.076,
"min_ms": 0.865,
"throughput_windows_per_sec": 325.1,
"window_shape": [1, 8],
"dtype": "float32",
"device": "npu:0",
"warmup": 3,
"measured_runs": 10,
"note": "稳定态 <1ms, 编译开销计入平均; 8KB 量化模型理论更快但未单独计时"
}


asr 但实际为 csi-encoding WiFi 感知, 已按最匹配路线实现, 不伪造语音转写。#NPU #Ascend #Ascend910