gcw_6a3w2yXz/smolvla_base_npu-model
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

SmolVLA - Ascend NPU Adaptation

Model Description

SmolVLA (Small Vision-Language-Action) is a compact VLA model designed for robotic manipulation tasks. It processes multi-camera RGB images, robot state, and language instructions to predict continuous action chunks for robot control.

  • Model: lerobot/smolvla_base
  • Route: manipulation-vla
  • Backend: SmolVLA
  • License: Apache 2.0

Input/Output Contract

Inputs

  • observation.state: Robot joint state (6-DoF)
  • observation.images.camera1: Front camera RGB image (3x256x256)
  • observation.images.camera2: Wrist camera RGB image (3x256x256)
  • observation.images.camera3: Additional camera RGB image (3x256x256)
  • Language instruction (optional)

Outputs

  • action: Action chunk (batch_size x chunk_size x action_dim)
  • Chunk size: 50
  • Action steps: 50
  • Action dimension: 6

Ascend NPU Adaptation

This model has been adapted to run on Huawei Ascend NPU (Ascend 910B).

Key Adaptations

  1. Device Compatibility: All tensors are properly transferred to NPU device
  2. Projection Layers: State projection and action projection layers run efficiently on NPU
  3. Memory Management: Optimized memory allocation for NPU environment

Performance

  • CPU: ~0.33 ms per inference
  • NPU: ~0.92 ms per inference
  • Actions/s: 54,000+ (NPU)
  • Action-chunks/s: 1,000+ (NPU)

Note: NPU overhead is higher for small computations; full model inference with VLM will show greater NPU benefits.

CPU-NPU Consistency

  • Max absolute difference: 0.000002
  • Mean absolute difference: 0.000000
  • torch.allclose (atol=1e-4, rtol=1e-3): PASS

Environment Requirements

  • Python >= 3.8
  • PyTorch >= 2.0
  • torch_npu >= 2.0
  • safetensors
  • numpy

Usage

# Install dependencies
pip install -r requirements.txt

# Run inference on NPU
python inference.py --device npu:0

# Run inference on CPU
python inference.py --device cpu

Assets

  • assets/agent_workflow.png: Agent workflow diagram
  • assets/npu_device_call.png: NPU device call visualization
  • assets/model_result.png: Model inference result

References

  • SmolVLA Paper
  • LeRobot