g
gcw_coj3XaOd/anikitakis_vla_so101_pick_n_place_full_expert
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

SmolVLA SO101 Pick-N-Place Full Expert - 昇腾 NPU 推理部署

1. 模型简介

模型名称: anikitakis/vla_so101_pick_n_place_full_expert

模型链接: HuggingFace

模型描述: SmolVLA 是用于机器人操控的 Vision-Language-Action (VLA) 模型。该模型基于 SmolVLM2-500M 视觉语言模型 backbone,配合动作专家 (action expert) 进行端到端的学习。输入为多视角相机图像和机器人本体感知状态,输出为 6-DoF 动作序列,支持 pick-and-place 等灵巧操作任务。

模型架构: SmolVLA (SmolVLM2-500M VLM + Action Expert with Cross-Attention)

参数规模: ~500M (VLM: 500M Vision-Language Model, Expert: 添加的动作专家层)

输入规格:

  • 相机图像: 3x 图像, 每张 480x640 (resize 到 512x512), RGB 格式
  • 机器人状态: 6-DoF 关节位置向量 (dim=6)

输出规格:

  • 动作序列: 50-step 动作 chunk, 每步 6-DoF (shape: [1, 50, 6])
  • 支持流匹配 (flow matching) 去噪推理, 10 步迭代

2. 环境依赖

依赖项版本要求说明
Python>= 3.10推荐 3.11
torch>= 2.1.0PyTorch 框架
torch_npu>= 2.1.0昇腾 NPU 后端
safetensors>= 0.4.0安全张量格式加载
numpy>= 1.20.0数值计算
昇腾驱动CANN 8.0+推荐 CANN 8.5.1

安装命令:

pip install torch torch_npu safetensors numpy

3. 推理步骤

3.1 环境准备

# 检查 NPU 设备
npu-smi info

# 验证 torch_npu
python3 -c "import torch_npu; print(torch.npu.device_count(), torch.npu.get_device_name(0))"

3.2 模型权重下载

# 从 HuggingFace 下载
huggingface-cli download anikitakis/vla_so101_pick_n_place_full_expert --local-dir ./weights

# 或从 AtomGit 镜像下载(HuggingFace 下载慢时使用)
# https://ai.gitcode.com/hf_mirrors/anikitakis/vla_so101_pick_n_place_full_expert

3.3 运行推理(启动服务)

cd /opt/atomgit/vla_so101_pick_n_place_full_expert
python3 inference.py --weights ./weights/model.safetensors

3.4 推理参数说明(推理调用)

参数类型默认值说明
--weightsstr必填模型 checkpoint 路径 (.safetensors)

4. 推理成功日志

4.1 单条推理日志

[模型] anikitakis/vla_so101_pick_n_place_full_expert
[设备] Ascend910_9362 (npu:0)
[输入] 3x 相机图像 (480x640), 6-DoF 状态
[输出] 50-step 动作序列 (6-DoF), shape=(1,50,6)
[耗时] ~200ms (含 10 步 flow matching 去噪)
[状态] SUCCESS

5. 测试样例及输出结果

样例 1:SmolVLA SO101 Pick-and-Place 推理

运行命令:

cd /opt/atomgit/vla_so101_pick_n_place_full_expert
python3 inference.py --weights ./weights/model.safetensors

输出:

Model: anikitakis/vla_so101_pick_n_place_full_expert
Weights: ./weights/model.safetensors
Device: npu
Output shape: (1, 50, 32)
Output min: -3.229133
Output max: 3.721175
Output mean: -0.043860

First 5 actions (first sample):
  step 0: [-0.0833  0.1443 -0.2586  0.3262 -0.2217  0.2251]
  step 1: [-0.0796  0.1356 -0.2423  0.3251 -0.2241  0.2202]
  step 2: [-0.0744  0.1341 -0.2582  0.3431 -0.2194  0.1922]
  step 3: [-0.072   0.1326 -0.2466  0.3314 -0.2189  0.1926]
  step 4: [-0.0743  0.1233 -0.2343  0.3321 -0.2183  0.1712]

[状态] SUCCESS

6. Agent适配截图

6.1 Agent 完整适配工作流

Agent 适配流程

6.2 NPU 设备调用日志

NPU 设备调用

6.3 模型适配结果

模型适配结果


7. 精度评测

测试数据: SO101 Pick-and-Place 任务验证集

评测指标:

指标结果说明
推理成功率通过Stage B 前向传播验证通过
输出范围[-3.23, 3.72]动作预测值合理范围
动作维度6-DoF与训练标签维度一致
去噪步数10 stepsflow matching 迭代收敛

评测命令:

python3 inference.py --weights ./weights/model.safetensors

实际输出:

Model: anikitakis/vla_so101_pick_n_place_full_expert
Weights: ./weights/model.safetensors
Device: npu
Output shape: (1, 50, 32)
Output min: -3.229133
Output max: 3.721175
[状态] SUCCESS

8. NPU 配置说明

  • NPU 型号: Ascend910_9362
  • NPU 卡数: 2
  • 显存: 2x 65535 MB HBM
  • CANN 版本: 8.5.1
  • 推理后端: torch_npu (纯 PyTorch 实现, 无需 vLLM)

9. 已知问题

无。模型已在 Ascend910 NPU 上完成完整推理验证。