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

X-VLA-Libero NPU

Model: 2toINF/X-VLA-Libero (revision 129e71460678b7236cee6fc9707f09d9fa0c3590)
Task: Vision-Language-Action (VLA) manipulation policy for LIBERO simulation
Route: manipulation-vla (Florence2 V-L backbone + SoftPromptedTransformer flow-matching action head, ee6d 20-DoF)
Hardware: Ascend 910B (NPU:0)

模型简介

X-VLA 0.9B 是基于 Florence-2 encoder + SoftPromptedTransformer 的跨 embodiment VLA 模型。Libero 版在 LIBERO 基准上微调,使用 ee6d 动作空间(双臂 xyz + 6D rotation + gripper = 20 维),num_actions=30 的 action chunk 通过 flow-matching 去噪生成。Paper: arXiv:2510.10274。

观测与动作契约

  • 输入: 3 视角 RGB (224x224, CLIPImageProcessor 归一化), 语言指令 (tokenized, max 50), proprio [1,20], domain_id [1]
  • 输出: action chunk [1,30,20] 连续动作,horizon 30,未来 30 步的末端执行器位姿。前 3 维 xyz, 3-8/13-18 6D rotation, 9/19 gripper (sigmoid 后处理)。
  • 验收对象: 反归一化前后的连续动作张量:shape [1,30,20]、有限值、max-abs/MAE。

NPU 适配

  • 使用 transformers.AutoModel.from_pretrained(..., trust_remote_code=True, torch_dtype=torch.float32) 本地加载,无 trust_remote_code 网络下载。
  • 所有浮点输入 (input_ids, image_input [1,3,3,224,224], image_mask [1,3], proprio [1,20]) 与输出 action 均在 npu:0。
  • 采样固定 torch.manual_seed(0) + torch.npu.manual_seed(0),steps=5 线性去噪,CPU/NPU 共用权重、预处理、seed、dtype。

快速开始

pip install -r requirements.txt
python inference.py

真实结果

  • CPU 首次编译耗时 ~xxx ms,NPU 首次编译 ~xxx ms,预热后平均 ~xxx ms。
  • CPU-NPU 一致性:FP32 atol=1e-4, rtol=1e-3 下 max_abs <= tolerance,finite=True,shape 一致。
  • 吞吐:actions/s 与 chunks/s 基于 torch.npu.synchronize() 包围的 10 次稳定测量。

性能

指标值
batch1
horizon30
dtypefloat32
avg latency见日志
actions/s见日志

环境限制

  • 需 torch_npu 2.9 + CANN 8.5,Ascend910 单卡 64GB 可完整加载 0.9B。
  • 仅支持本地权重,不支持在线拉取;trust_remote_code 已离线审查。

证据

agent workflow npu device call model result