许可证: mit
语言:
- 英文
基础模型:
- IPEC-COMMUNITY/spatialvla-4b-224-pt
任务标签: 图像-文本到文本
库名称: transformers
标签:
- 视觉语言动作模型
- 基础视觉语言动作模型
- 通用机器人策略
- 机器人技术
基于分形与桥数据集微调的SpatialVLA模型
本模型通过对SpatialVLA基础模型在分形与桥数据集上进行微调得到。我们对训练数据集进行了若干优化以提升最终性能(详见SpatialVLA论文)。该模型仅用于论文表V中领域数据集微调消融实验。
模型详情
模型描述
使用方式
SpatialVLA完全基于HuggingFace Transformers🤗构建,部署极为简便。若环境支持transformers >= 4.47.0
,可直接使用以下代码加载模型进行推理(需8.5GB显存)。
直接调用
import torch
from PIL import Image
from transformers import AutoModel, AutoProcessor
model_name_or_path="IPEC-COMMUNITY/spatialvla-4b-224-pt"
processor = AutoProcessor.from_pretrained(model_name_or_path, trust_remote_code=True)
model = AutoModel.from_pretrained(model_name_or_path, trust_remote_code=True, torch_dtype=torch.bfloat16).eval().cuda()
image = Image.open("example.png").convert("RGB")
prompt = "机器人应采取什么动作拿起杯子?"
inputs = processor(images=[image], text=prompt, return_tensors="pt")
generation_outputs = model.predict_action(inputs)
actions = processor.decode_actions(generation_outputs, unnorm_key="bridge_orig/1.0.0")
print(actions)
非适用场景
SpatialVLA模型无法零样本泛化到预训练数据未覆盖的新机器人构型或设置。针对此类情况,建议在目标设备上收集演示数据后进行微调。
实践指南
如需进行微调或预训练,需先克隆官方仓库:
git clone https://github.com/SpatialVLA/SpatialVLA.git
随后安装依赖包并从Hugging Face模型库下载模型。SpatialVLA的视觉语言主干基于PaLiGemma2,要求Python>=3.10环境:
conda create -n spatialvla python=3.10
conda activate spatialvla
从requirements.txt
安装依赖包(注:我们使用定制版dlimp
确保实验可复现,若遇问题请手动安装dlimp_custom):
pip install -r requirements.txt
从零训练
SpatialVLA使用64块A100 GPU(批次2048)在OXE和RH20T的110万条真实机器人演示数据上预训练约10天。可通过以下命令启动预训练:
bash scripts/spatialvla_4b_pretrain/torchrun_pretrain.sh
bash scripts/spatialvla_4b_pretrain/slurm_pretrain.sh
微调
多数微调实验使用4-8块A100 GPU进行LoRA训练。小规模真实数据场景推荐使用LoRA微调:
bash scripts/spatialvla_4b_finetune/finetune_full.sh
bash scripts/spatialvla_4b_finetune/finetune_lora.sh
评估结果
- Google Robot任务在SimplerEnv环境下的表现
(表格内容保持不变,仅作翻译处理)
- WidowX Robot任务在SimplerEnv环境下的表现
(表格内容保持不变,仅作翻译处理)


引用
BibTeX格式:
@misc{qu2025spatialvlaexploringspatialrepresentations,
title={SpatialVLA: 视觉-语言-动作模型的空间表征探索},
author={瞿德林 and 宋浩铭 and 陈启智 and 姚远祺 and 叶昕怡 and 丁岩 and 王志刚 and 顾佳元 and 赵斌 and 王栋 and 李学龙},
year={2025},
eprint={2501.15830},
archivePrefix={arXiv},
primaryClass={cs.RO},
url={https://arxiv.org/abs/2501.15830},
}