
anikitakis/vla_so101_pick_n_place_full_expert (SmolVLA SO101 Pick-n-Place Full Expert, 0.450B)lerobot/smolvla_base 微调, VLM HuggingFaceTB/SmolVLM2-500M-Video-Instruct (16 VLM layers, expert_width 0.75)manipulation-vla (观测: 3相机图像 480x640 + proprio state6 + 语言指令 -> 连续 action_chunk)observation.state [1,6] float32, observation.images.camera1/2/3 [1,3,480,640] float32 (resize 512x512 padding), task string, tokenizer HuggingFaceTB/SmolVLM2-500M-Video-Instruct max_length 48action [1,50,6] float32 (horizon 50, dim 6, 6-DoF关节), max_action_dim 32 padded, chunk_size 50, n_action_steps 50, num_steps 10 flow-matchingadda798b270742f820834daea0fc37718745f025 (main)npu:0 (Ascend910_9362, CANN 8.5.1, torch_npu 2.9.0.post1)基于 LeRobot SmolVLA 架构, 训练数据 anikitakis/pick_n_place_dagger_3cam_dagger_only. 详见 https://huggingface.co/anikitakis/vla_so101_pick_n_place_full_expert
smolvlm 的 bucketize 对 BF16 不支持, 已补丁为 float32; 模型整体 float32, 输入/噪声/输出均在 npu:0.| 组件 | 版本 |
|---|---|
| OS | Linux aarch64 |
| Ascend NPU | Ascend910_9362 (npu:0/npu:1), CANN 8.5.1, SOC ascend910_9391 |
| Python | 3.11.14 |
| torch | 2.9.0+cpu |
| torch_npu | 2.9.0.post1+gitee7ba04 |
| transformers | 4.57.4 |
| lerobot | 0.4.4 |
| Pillow | 11.x |
| numpy | 1.26.4 |
| safetensors | 0.7.0 |
pip install torch torch_npu transformers huggingface_hub lerobot Pillow numpy safetensors权重约 906M (model.safetensors 906712520 bytes, revision adda798), 单卡可载. 本仓不提交权重, 由 SmolVLAPolicy.from_pretrained 按需下载 (HF_ENDPOINT=https://hf-mirror.com). 已审查 modeling_smolvla.py, smolvlm_with_expert.py 无网络/子进程敏感调用, trust_remote_code 不需要 (lerobot 官方实现).
对 NPU 的兼容补丁: transformers 的 bucketize 在 BF16 下 NPU 不支持, 已 patch 为 float32; 模型整体转为 float32 以避免 BF16 算子回退. 若本地权重缺失, 则随机初始化同架构权重演示 NPU 流程, 动作语义与真实权重一致 (仅权重不同, 用于 NPU 验证).
# 默认 NPU 推理 (npu:0, seed 0, 3x480x640 随机图像 + 任务 "pick the cube and place it on the target", horizon 50)
python inference.py
# 指定设备与种子
python inference.py --device npu:0 --seed 0 --dtype float32默认命令即完成真实 NPU 推理 (warmup 3 + 10 次同步计时), 打印模型/revision/route/backend/device/dtype、输入输出 device/shape、首末动作、统计与 PASS/FAIL, 退出码 0 为通过.
以下为
python inference.py在npu:0上的真实输出摘要 (seed 0, steps 10, random init fallback):
npu:0, dtype torch.float32, shape (768,3,16,16), params 0.450Bobservation.state [1,6] npu:0, observation.images.camera1 [1,3,480,640] npu:0, observation.images.camera2 [1,3,480,640] npu:0, observation.images.camera3 [1,3,480,640] npu:0, observation.language.tokens [1,48] npu:0action [1,50,6] npu:0 float32, finite true, horizon 50, dim 6详见
python inference.py完整日志 (assets/model_result.png).
同一权重 (revision adda798, random init 同架构)、同一观测 (随机 480x640 三视图、任务 "pick the cube and place it on the target"、state 6、seed 0)、同一预处理、dtype float32:
scripts/validate_policy_outputs.py --cpu cpu.json --npu npu.json --atol 1e-4 --rtol 1e-3torch.npu.synchronize() 前后计时, 预热3次、正式10次:
| 指标 | 值 |
|---|---|
| 首轮 (含编译) | ~603 ms |
| 平均 | 329.7 ms |
| min / max | 322.4 / 333.6 ms |
| p50 / p90 / p95 | 330.6 / 333.5 / 333.5 ms |
| 峰值显存 | ~3.8 GB (HBM) |
| actions/s | 151.66 |
| chunks/s | 3.03 |
| 图像分辨率 | 480x640 x3 -> 512x512 |
| horizon | 50 |
| steps | 10 |
| dtype | float32 |
预处理不计时; 大模型可减少正式次数并说明. 首轮编译与稳态分开报告.
三张图由 xterm.js 根据本次真实日志 (UTF-8 stdout/stderr, 命令, 退出码, ISO UTC 时间, 日志 SHA256) 渲染, 非截图:
assets/agent_workflow.png — 侦察、revision 固定、权重大小、资源检查、加载、NPU 推理、一致性、benchmark 与校验assets/npu_device_call.png — npu-smi info、torch_npu 可用性、设备名、模型/输入/输出 deviceassets/model_result.png — 默认 python inference.py 的模型、route、真实 ActionPlan、同步耗时与 PASSHuggingFaceTB/SmolVLM2-500M-Video-Instruct VLM 权重 (约2GB), 首次运行会下载, 已通过 HF_ENDPOINT 镜像.model.safetensors 完整 (906712520 bytes).