#NPU
AutonLab/MOMENT-1-largehttps://huggingface.co/AutonLab/MOMENT-1-largegoogle/flan-t5-large (T5, d_model=1024, d_ff=2816, 24 encoder layers + 24 decoder layers, 16 heads, vocab 32128), patch_len=8, patch_stride=8, seq_len=512python inference.py 默认在 npu:0 完成真实NPU推理x_enc: [batch, n_channels, seq_len] float32, input_mask: [batch, seq_len] float32 (全1表示无缺失), 轴顺序明确为 [B, C, T]reconstruction: [batch, n_channels, seq_len] float32, 与输入同形状, 逆变换已完成 (直接重构值)pip install -r requirements.txtpython inference.py真实日志片段 (npu:0):
[INFO] model_name: AutonLab/MOMENT-1-large
[INFO] npu_available: True
[INFO] npu_device_name: Ascend910_9362
[INFO] weight bytes: 1385501256 (1321.3 MB)
[INFO] first param device after to(npu:0): npu:0
[INFO] input shape: x_enc (2, 3, 512) input_mask (2, 512)
[INFO] reconstruction shape: (2, 3, 512)
[INFO] NPU inference time (single batch, sync): 22.19 ms
[INFO] avg latency over 10 runs: 21.46 ms
[INFO] throughput: 93.2 windows/s (143135.5 points/s)
[INFO] npu memory allocated: 1394.4 MB, max: 1421.4 MB
[SUCCESS] MOMENT-1-large NPU reconstruction completed.opencode/skills/npu-adapt-skills/scripts/compare_outputs.py --task regressiontorch.npu.synchronize()三图由 xterm.js 根据本次真实日志渲染生成 (raw 风格, 深灰背景, 提示符 atomgit@pod-a94f8701860f4700b161b00e290de466:~$):
assets/agent_workflow.pngassets/npu_device_call.pngassets/model_result.png
