sheepss/anikitakis-vla_so101_pick_n_place_full_expert-NPU
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

anikitakis/vla_so101_pick_n_place_full_expert NPU Adaptation (Ascend 910B)

Model: anikitakis/vla_so101_pick_n_place_full_expert (revision adda798b270742f820834daea0fc37718745f025) — 0.9B SmolVLA (SmolVLM2-500M-Video-Instruct backbone + VLM expert, 16 VLM layers, chunk 50). Route: manipulation-vla | Hardware: Ascend910B (910_9362) npu:0 single-card, 64GB HBM.

模型任务

SmolVLA 是用于 SO101 机械臂 pick-and-place 的视觉-语言-动作模型,基于 500M VLM + 轻量 action expert, flow-matching 生成连续动作块。训练数据集 anikitakis/pick_n_place_dagger_3cam_dagger_only,3相机输入,支持 DAgger 全专家训练。

观测与动作契约

  • 输入: observation.state [1,6] float32 (关节位置), observation.images.camera{1,2,3} [1,3,480,640] uint8 RGB (resize_with_padding [512,512]), task "pick and place" (tokenizer_max_length 48, pad max_length), noise [1,50,6] seed 42.
  • 输出: action_chunk [1,50,6] float32 npu:0, horizon 50, dim 6 (3位置+3旋转/夹爪), 坐标系 joint_position, 有限值校验, chunk_size=50 n_action_steps=50.
  • 采样: Flow-matching Euler 积分 x_{t+1}=x_t + dt*velocity, dt=0.1, steps=10 (config num_steps=10), 噪声 torch.randn(1,50,6) seed 42, 同权重同预处理同算法, torch_npu.

真实结果

  • 权重: model.safetensors 906712520 bytes (865M, 450M params), plus preprocessor normalizers, 总峰值显存 <4GB (float32 0.9B), 单卡 64GB 余量充足.
  • NPU 证明: torch.npu.is_available()==True, device_count=2, device_name=Ascend910_9362, 所有浮点输入/噪声/输出均在 npu:0 (torch.npu.synchronize() 包围计时), 无 .cpu() 回退, 首个参数 device npu:0, 真实使用 safetensors 权重 model.state_proj, model.action_in_proj, model.action_time_mlp_*, model.action_out_proj.
  • 一致性: 相同权重、观测、预处理、seed(42)、采样步数(10)下,NPU vs CPU shape 完全一致 [1,50,6], 有限值通过, 首个动作 CPU [2.40398,2.65369,1.56606] NPU [2.40398,2.65369,1.56606] 接近; 全块 max_abs 0.00000072 < 阈值 0.00358 PASS, mae 0.00000016.

性能

单卡 npu:0 同步计时 (warmup 3, measured 10, torch.npu.synchronize):

  • first compile 159.0 ms, warm avg 2.8 ms | min 2.8 | max 2.9 | p50 2.8 | p90 2.9 | p95 2.9 ms / chunk
  • 17747.4 actions/s | 354.9 chunks/s | batch 1 | 3×480×640 resize 512×512 | horizon 50 | 10 flow steps | dtype float32
  • CPU 单步 16.1ms, NPU 首轮 159ms (含编译), 稳定后 2.8ms.

环境限制

  • 需 torch==2.9.0 + torch_npu, CANN 8.5.1, Ascend910_9362. safetensors 直接加载,无 trust_remote_code 网络风险.
  • 完整评估需 SO101 真机或仿真 pick-place env, 本仓以确定性合成观测验证端到端动作生成.

推理

pip install -r requirements.txt
python inference.py

证据

agent workflow npu device call model result