跳到正文
Skillpedia
机器学习14k · #11167

fine-tuning-openvla-oft

它能做什么

这项技能使用官方代码库,涵盖 OpenVLA-OFT 的微调与评估。OpenVLA-OFT 是一种输出连续动作的机器人模型。适合希望复现结果或把模型适配到自己机器人上的机器人研究人员。

适用场景

  • ✓当你想在 LIBERO 模拟器上复现已发表的 OpenVLA-OFT 结果的时候。
  • ✓当你想针对自己的机器人数据训练一个自定义动作头的时候。
  • ✓当你需要把模型部署为 ALOHA 机器人可以调用的服务器的时候。

技能链接

https://github.com/Orchestra-Research/AI-Research-SKILLs/blob/main/18-multimodal/openvla-oft/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/Orchestra-Research/AI-Research-SKILLs/blob/main/18-multimodal/openvla-oft/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请帮我用 LoRA 在我自己的机器人示范数据上微调 OpenVLA-OFT,以便在 LIBERO 上测试?”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会设置官方仓库,通过轻量的 LoRA 训练和所选动作头来适配模型,然后运行评估或部署模型。它也会帮助解决归一化和 LoRA 合并问题。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

OpenVLA-OFT

Fine-tuning and evaluation workflows for OpenVLA-OFT and OpenVLA-OFT+ from the official openvla-oft codebase. Covers blank-machine setup plus LoRA-based adaptation of OpenVLA for robot action generation with continuous action prediction heads.

Quick start

Clone the public repo, follow the official setup, then evaluate a pretrained LIBERO checkpoint:

git clone https://github.com/moojink/openvla-oft.git
cd openvla-oft
python experiments/robot/libero/run_libero_eval.py \
  --pretrained_checkpoint moojink/openvla-7b-oft-finetuned-libero-spatial \
  --task_suite_name libero_spatial \
  --center_crop True \
  --num_trials_per_task 50 \
  --seed 7

Core concepts

What OpenVLA-OFT changes: Standard OpenVLA tokenizes continuous actions into discrete bins, losing precision. OFT replaces this with dedicated continuous action heads (L1 regression or diffusion) while keeping the VLA backbone frozen and adapting via LoRA.

OFT vs OFT+ variants:

Variant FiLM Images Typical use
OFT Off 2 (front + wrist) LIBERO simulation
OFT+ On 3 (high + left + right wrist) ALOHA real-world

Key architecture choices:

  • LoRA adaptation: Rank-32 LoRA on VLA backbone (no full fine-tuning needed)
  • Continuous actions: L1 regression head (default) or diffusion head
  • FiLM conditioning: Feature-wise Linear Modulation for stronger language grounding in OFT+
  • Multi-image input: Configurable 2 or 3 camera streams via num_images_in_input

Compute requirements

Task GPU VRAM Notes
LIBERO evaluation 1x A100/A40 ~16 GB Single GPU
ALOHA evaluation 1x A100/A40 ~18 GB Single GPU
LIBERO fine-tuning 8x A100 ~27 GB/GPU Paper default
ALOHA fine-tuning (OFT+) 8x A100 ~35 GB/GPU FiLM + 3 images
LoRA merge 1x any GPU ~16 GB One-time step

Expected performance benchmarks

Official results (paper setup, seed=7, 50 trials per task):

Task Suite Task-Specific Combined Policy Notes
LIBERO-Spatial 97.2% 96.8% Easiest suite
LIBERO-Object 97.4% 97.0% Object manipulation
LIBERO-Goal 95.8% 95.4% May peak at 50k-100k steps
LIBERO-10 98.0% 98.0% Long-horizon tasks
Average 97.1% 96.8% Near-equivalent

Reproduction notes: results are tied to Python 3.10.14, PyTorch 2.2.0, NVIDIA A100, and custom Transformers fork.

When to use vs alternatives

Use OpenVLA-OFT when:

  • The target task is robot action generation with visual and language conditioning
  • LoRA-based adaptation of openvla/openvla-7b is preferred
  • You need official LIBERO or ALOHA workflows from the OpenVLA-OFT paper
  • You want continuous action heads (L1 regression or diffusion) instead of tokenized actions

Use alternatives when:

  • You need a different VLA architecture (use fine-tuning-serving-openpi for pi0/pi0.5 models)
  • You need the NVIDIA Cosmos Policy stack (use evaluating-cosmos-policy)
  • You need general LLM fine-tuning without robot action heads

Workflow 1: Set up environment

Copy this checklist and track progress:

Setup Progress:
- [ ] Step 1: Create conda env and install PyTorch
- [ ] Step 2: Install openvla-oft package in editable mode
- [ ] Step 3: Install FlashAttention2
- [ ] Step 4: Verify critical versions

Step 1: Create conda env and clone repo

conda create -n openvla-oft python=3.10 -y
conda activate openvla-oft
git clone https://github.com/moojink/openvla-oft.git
cd openvla-oft
pip3 install torch==2.2.0 torchvision==0.17.0 torchaudio==2.2.0
pip3 install robosuite==1.4.0

Step 2: Install package

pip install -e .

Step 3: Install FlashAttention2

pip install packaging ninja
pip install "flash-attn==2.5.5" --no-build-isolation

Step 4: Verify versions

import torch, transformers, peft
print(f"PyTorch: {torch.__version__}")         # Expected: 2.2.0
print(f"Transformers: {transformers.__version__}")
print(f"PEFT: {peft.__version__}")             # Expected: 0.11.1

Workflow 2: Evaluate pretrained checkpoints on LIBERO

LIBERO Eval Progress:
- [ ] Step 1: Install LIBERO dependencies
- [ ] Step 2: Choose checkpoint and task suite
- [ ] Step 3: Run evaluation
- [ ] Step 4: Parse and validate results

Step 1: Install LIBERO

常见问题

什么是 LoRA?

它是一种轻量的适配大型模型的方法,只训练新增的小型层,而不是整个模型。

OFT 和 OFT+ 有什么区别?

OFT+ 增加了 FiLM 条件化,并在真实 ALOHA 环境中使用三张摄像头图像;OFT 在模拟中使用两张图像。

它能控制真实机器人吗?

能。这项技能涵盖 ALOHA 的服务器-客户端推理。

详情

作者的原始描述

Fine-tunes and evaluates OpenVLA-OFT and OpenVLA-OFT+ policies for robot action generation with continuous action heads, LoRA adaptation, and FiLM conditioning on LIBERO simulation and ALOHA real-world setups. Use when reproducing OpenVLA-OFT paper results, training custom VLA action heads (L1 or diffusion), deploying server-client inference for ALOHA, or debugging normalization, LoRA merge, and cross-GPU issues.

repo: Orchestra-Research/AI-Research-SKILLs

热度

GitHub 星标
14k
排名
#11167
许可证
MIT
更新时间
2026/10/10

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能