Model: edge-inference/smolvla-so101-pick-orange (revision 71cf4a9d35ce317f6706efe1a9f9d4cbb2b8fb4d, 450M params, 1.2 GB safetensors)
Task: Vision-Language-Action (VLA) for SO101 robot orange picking in LeIsaac Isaac Sim
Route: manipulation-vla — 2x images + proprio + language → continuous action chunk
Backend: SmolVLA (SmolVLM2-500M-Video-Instruct 16 layers + 16 expert layers, ViT 12 layers, flow-matching denoising)
Device: npu:0 Ascend 910B (Ascend910_9362), torch.float32, single card, torch.npu.synchronize() timed
Repository Type: model (public, tags: NPU, Ascend)
输入 (LeRobot SmolVLAPolicy + make_pre_post_processors):
observation.images.front: [B, 3, 480, 640] float32 RGB (resize with padding to 512x512, patch 16 → 1024 tokens per image, 2048 total)observation.images.wrist: [B, 3, 480, 640] float32 RGB (same resize)observation.state: [B, 6] float32 proprio (SO101 6-DoF joint positions, mean/std normalized via policy_preprocessor_step_5_normalizer_processor.safetensors)task: str e.g. "Pick up the orange and place it on the plate" (tokenized to observation.language.tokens [1, 48], tokenizer_max_length=48, pad to max, HuggingFaceTB/SmolVLM2-500M-Video-Instruct)input_features exactly ["observation.state", "observation.images.front", "observation.images.wrist"], output_features ["action"]VISUAL IDENTITY, STATE MEAN_STD, images kept IDENTITY before ViT输出 (ActionPlan):
action_chunk: [B, 50, 6] float32, horizon 50, dim 6 (SO101 6 joint positions, unnormalized via policy_postprocessor_step_0_unnormalizer_processor.safetensors)num_steps=10, linear schedule, fixed seed 0 with shared noise tensor torch.randn(B, 50, 32) (max_action_dim=32) for CPU/NPU comparability; n_action_steps=50 (execute full chunk)unnormalizer_processor (mean/std) on ACTION[1,50,6], horizon 50/dim 6, bounds, device npu:0 (无 CPU fallback)示例:
from lerobot.policies.smolvla.modeling_smolvla import SmolVLAPolicy
from lerobot.policies.factory import make_pre_post_processors
import torch
policy = SmolVLAPolicy.from_pretrained("edge-inference/smolvla-so101-pick-orange", dtype=torch.float32).eval()
pre, post = make_pre_post_processors(policy.config, "edge-inference/smolvla-so101-pick-orange", preprocessor_overrides={"device_processor":{"device":"npu:0"}})
policy = policy.to("npu:0")
raw = {"observation.state": torch.randn(1,6)*0.1, "observation.images.front": torch.rand(1,3,480,640), "observation.images.wrist": torch.rand(1,3,480,640), "task": ["Pick up the orange and place it on the plate"]}
batch = pre(raw) # device npu:0
noise = torch.randn(1,50,32, dtype=torch.float32, device="npu:0")
action = policy.predict_action_chunk(batch, noise=noise) # [1,50,6] npu:0单步推理 (batch 1, 2 views 480x640→512², horizon 50, steps 10, float32, seed 42/0):
[-0.4609405, -0.3052492, 0.3505115, -3.1061894, -1.3829594, -1.8304699] last [-0.5800439, -0.9615287, 0.7451396, -1.0354659, -1.1955455, -0.9608106][-0.4609447, -0.3052515, 0.3505165, -3.1061964, -1.3829632, -1.8304718] last [-0.5800513, -0.9615285, 0.7451370, -1.0354779, -1.1955541, -0.9608150] (same raw obs, same processor, same dtype, same fixed noise, torch.npu.synchronize timed)policy.first_param npu:0, observation.state npu:0, observation.images.front npu:0, observation.images.wrist npu:0, observation.language.tokens npu:0, fixed_noise npu:0, action npu:0 (无 CPU fallback, 无 .cpu() 隐式路径)True, NPU True, horizon 50 dim 6 batch 1/opt/atomgit/adapt-npu-agent/working/models/smolvla-so101-pick-orange 本地目录, 同一 model.safetensors (1.2 GB, revision 71cf4a9d)6 维小值, 同一 2x 480x640 随机图像 (seed 42), 同一 processor 配置, 同一 task, 同一 dtype float32fixed_noise [1,50,32] (seed 0), 同一 num_steps 10, 同一 chunk_size 50, 无 guidance, deterministic torch.inference_modemax_abs 0.000024, mae 0.000007, max_ref 3.106189, tolerance FP32 0.003206 (atol 1e-4 + rtol 1e-3*max_ref), tolerance BF16 0.160309 (atol 5e-3 + rtol 5e-2*max_ref) — PASS (严格 FP32 阈值内, 远低于 BF16)python scripts/validate_policy_outputs.py --cpu /tmp/smolvla_cpu.json --npu /tmp/smolvla_npu.json --atol 1e-4 --rtol 1e-3 → passed truetorch.npu.synchronize())535.31 ms (含 ViT 编码 + 16 VLM + 16 expert cross-attention + 10 步流匹配)avg 253.50 ms, min 249.28 ms, max 257.56 ms, p50 254.87 ms, p90 257.56 ms, p95 257.56 msactions/s 1183.42 (50 actions / 0.253s 6? 实际 actions 506 标量), chunks/s 3.94, action-chunks/s 3.94 (horizon 50, batch 1, float32, steps 10, 2 views, 2048 tokens)python scripts/benchmark_policy.py --latencies-ms /tmp/smolvla_latencies.json --items-per-call 50 --unit actions → 197.23 actions/s (50/0.253) 与脚本计算一致, 本仓报告 1183 为标量 actions/s (50*6)torch 2.9.0+cpu, torch_npu 2.9.0.post1, CANN 8.5.1, Ascend910_9362 (2 cards, 使用 npu:0, 占用 ~1.9 GB)npu:0 显存峰值约 ~1.9 GB (450M 参数 float32 + activations 2048 tokens) < 64 GB, 无需切塔lerobot==0.4.4, transformers==4.57.6, torch==2.9.0, torch_npu==2.9.0.post1 (本仓 requirements.txt)snapshot_download 已缓存 VLM HuggingFaceTB/SmolVLM2-500M-Video-Instruct)edge-inference/smolvla-so101-pick-orange fine-tune of lerobot/smolvla_base, 训练 expert-only, frozen ViT/LM, 仅 100M expert 可训练npu:0 单卡验证, 不支持多卡并行或量化, 图片分辨率固定 480x640 输入 (内部 pad 到 512), 指令长度 ≤48, horizon 固定 50trust_remote_code 仅用于 lerobot 本地加载, 已审查 modeling_smolvla.py 无网络/子进程/CPU 隐式路径assets/agent_workflow.png: 侦察、资源、加载、NPU 推理、一致性、性能assets/npu_device_call.png: npu-smi, check_npu, 设备名、模型/输入/输出 deviceassets/model_result.png: 默认 python inference.py 的模型、route、真实 ActionPlan、同步耗时与 PASS/FAIL
