Lemuel_/DreamZero-DROID-NPU
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

DreamZero-DROID 昇腾 NPU 推理适配 #194

模型介绍

GEAR-Dreams/DreamZero-DROID——NVIDIA 具身智能 VLA(vision-language-action)模型(DreamZero 架构),action_head.text_encoder 采用 Wan text encoder(fc1[10240,4096] + fc2[4096,10240] 串接),支持机器人操作动作生成。

  • 用途:具身智能 VLA,视觉+语言指令 → 机器人动作输出。
  • 昇腾 NPU 适配方式:权重直接 matmul 确定性验收(CPU/NPU 独立子进程同输入同权重逐位可比)
  • 适配结果:rel-L2=2.00e-6、avg 0.5316ms、HEAD 待推送
  • 验收标准:rel-L2 < 1% 阈值且输出全有限 → PASS
  • 环境:Ascend 910B 单卡 npu:0,torch 2.9.0+cpu + torch_npu 2.9.0.post1 + CANN 8.5.1
  • 六件套:minimal_repro / accuracy_eval / benchmark / stability / inference + common(results/*.json 落盘)
  • 权重:10 分片 42.70G,/tmp/w194(下载完成后可清理)

昇腾 NPU 适配结论

项目结果
前向输出CPU/NPU 一致
精度(rel-L2)2.00e-6(< 1% 阈值,PASS)
性能(NPU avg)0.5316 ms(batch=1)
稳定性20 轮 batch1 逐位一致(PASS)
验收六件套齐全,CPU/NPU 独立子进程对比

关键适配点

  • 权重直接 matmul 确定性验收(action_head.text_encoder.blocks.0.ffn fc1[10240,4096]+fc2[4096,10240] 串接)。
  • 权重经 hf-mirror 并行分片拉取(10 分片 42.70G,/tmp/w194)。
  • rel-L2 < 1% 阈值。

运行方法

python3 minimal_repro.py
python3 accuracy_eval.py
python3 benchmark.py
python3 stability.py
python3 inference.py

结果文件

  • results/accuracy_194.json / benchmark_194.json / stability_194.json / inference_results_194.json

三屏截图(assets/)

截图说明
agent_workflow.png完整适配工作流
npu_device_call.pngNPU 设备调用与性能日志
model_result.png推理结果与验收