waylong/X-VLA-WidowX-NPU
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

X-VLA-WidowX NPU Adapted

Base Model: 2toINF/X-VLA-WidowX (Revision: 8d7ea1aaa948665d44129a3ff488629b955fc0f9)

Adapted for: Huawei Ascend 910B NPU (npu:0) via torch_npu

Route: manipulation-vla (Florence2 + SoftPromptedTransformer, ee6d action space, 30 action horizon, 20 dim)

Model Task

Vision-Language-Action model for WidowX robot. Observes multi-view RGB (3 views, 224x224) + proprio (20-dim) + language instruction, outputs continuous action chunk [1, 30, 20] via flow-matching denoising (10 steps). Action space ee6d with xyz + 6D rotation + gripper (sigmoid).

Observation & Action Contract

  • Inputs:
    • input_ids: [1, 50] (tokenized language, BartTokenizer)
    • image_input: [1, 3, 3, 224, 224] (3 views, CLIP normalized)
    • image_mask: [1, 3] (bool)
    • proprio: [1, 20] (ee6d, zeros for test)
    • domain_id: [1] (0 for WidowX)
    • Fixed x1 noise [1, 30, 20] (seed 42) for deterministic CPU-NPU comparison
  • Outputs:
    • action_chunk: [1, 30, 20] float32, finite, postprocessed (gripper sigmoid), horizon 30, dim 20

Real Results (NPU:0)

  • CPU (42.8s for 10 steps): first action [0.0751, 0.0031, 0.0282, 0.2089, -0.0112], last [0.2693, 0.0256, 0.1031, 0.9287, -0.0190], max 0.94, mean 0.13
  • NPU (avg 138ms, 217 actions/s, 7.2 chunks/s): first action [0.0752, 0.0032, 0.0282, 0.2087, -0.0113], max 0.94, finite true
  • Consistency: max_abs 0.00137, mae 9.6e-05, tol 0.052 (atol 5e-3, rtol 5e-2) → PASS
  • Device Proof: model param npu:0, inputs npu:0, output npu:0, sampler npu:0, torch.npu.synchronize() used
  • Performance: Warmup 3, 10 measured, avg 138.3ms, min 137.6, max 138.8, p50 138.3ms, 30 actions per chunk → 217 actions/s

Environment

  • Ascend 910B, CANN 8.5.1, torch 2.9.0+cpu, torch_npu 2.9.0.post1, transformers 4.44.2, timm, einops, safetensors
  • Single card npu:0, batch 1, 3 views 224x224, horizon 30, dim 20, steps 10, dtype float32

Limitations

  • Requires trust_remote_code=True (custom XVLA code, reviewed)
  • Only WidowX embodiment (domain 0) tested; other domains may need different domain_id
  • CPU-NPU strict tolerance (1e-4) not met (0.001), but NPU tolerance (5e-3) passes

Evidence

  • Agent workflow: agent_workflow
  • NPU device call: npu_device_call
  • Model result: model_result

Usage

pip install -r requirements.txt
python inference.py

Acknowledgement

Base model by 2toINF, adapted for Ascend NPU via torch_npu.