liucu/ruview
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

ruv/ruview on Ascend NPU

模型与任务

  • 模型:ruv/ruview
  • Revision:472cfbe8482403256d45f4acb0aed1a5f0db41be
  • 适配路线:csi-encoding
  • 设备:npu:0

环境依赖

{
  "torch_version": "2.9.0+cpu",
  "torch_npu_available": true,
  "npu_available": true,
  "device_count": 2,
  "device_name": "Ascend910_9362",
  "cann_version": "8.5.1",
  "python": "3.11.14"
}

安装:pip install -r requirements.txt

NPU 推理

默认执行:python inference.py

真实输入

{
  "source": "synthetic seeded CSI 8-dim feature windows mimicking RuView ESP32 feature stream (seed=20250403)",
  "sampling_rate": "1 Hz",
  "inputDim": 8,
  "hiddenDim": 64,
  "embeddingDim": 128,
  "shape": [
    16,
    8
  ],
  "dtype": "float32",
  "normalization": "per-channel",
  "sha256": "fb754a506ad9dae425790b6769cec28c885e4b01e92ec495fa486e45a2f07176",
  "csi_matrix": "8-dim feature vector per window (not raw 30x3x3 matrix; model expects pre-processed features)",
  "example_window": [
    2.5910778045654297,
    1.8531543016433716,
    0.09083575010299683,
    0.7331889271736145
  ]
}

真实推理结果

{
  "type": "perception embedding",
  "shape": [
    16,
    128
  ],
  "dtype": "float32",
  "device": "npu:0->cpu",
  "l2_normalized": true,
  "first_window_embed_first5": [
    -0.10589344799518585,
    0.07680541276931763,
    0.07292653620243073,
    0.028076229616999626,
    -0.04917340353131294
  ],
  "l2_norm": 1.0,
  "presence_head": {
    "threshold": 0.3,
    "logit_npu": 8.14671,
    "prob_npu": 0.99971,
    "logit_cpu": 8.14671,
    "prob_cpu": 0.99971
  }
}

CPU-NPU 一致性

{
  "method": "cpu vs npu identical weights/input/preprocessing, 16 windows, float32",
  "max_abs_diff": 1e-07,
  "mean_abs_diff": 2e-08,
  "mean_cosine": 1.00000004,
  "min_cosine": 1.0,
  "atol": 0.0001,
  "rtol": 0.0001,
  "passed": true,
  "verdict": "PASS"
}

性能

{
  "device": "npu:0",
  "dtype": "float32",
  "batch_windows": 16,
  "avg_latency_ms": 0.333,
  "throughput_windows_per_sec": 48106.8,
  "single_window_latency_ms": 0.359,
  "warmup": 3,
  "stable_runs": 10,
  "synchronized": true,
  "embeddingDim": 128,
  "inputDim": 8,
  "peak_npu_memory_bytes": 56320
}

自验证截图

Agent workflow

NPU device call

Model result

已知限制

  • 仅对本次记录的模型 revision、输入契约、dtype 与 Ascend 环境完成验证。
  • 量化模型 q2/q4/q8 未单独验证,本次使用全精度 safetensors。
  • WiFlow pose (17 keypoints) 未在此 csi-encoding 路线验证。

标签

#NPU #Ascend #Ascend910