Views
No views yet
openvla-7b) is an open vision-language-action model trained on 970K robot manipulation episodes from the Open X-Embodiment dataset.
The model takes language instructions and camera images as input and generates robot actions. It supports controlling multiple robots out-of-the-box, and can be quickly adapted for new robot domains via (parameter-efficient) fine-tuning.prism-dinosiglip-224px, a VLM trained from:
openvla-7b for zero-shot instruction following in the [BridgeV2 environments] with a Widow-X robot:1# Install minimal dependencies (`torch`, `transformers`, `timm`, `tokenizers`, ...)
2# > pip install -r https://raw.githubusercontent.com/openvla/openvla/main/requirements-min.txt
3from transformers import AutoModelForVision2Seq, AutoProcessor
4from PIL import Image
5
6import torch
7
8# Load Processor & VLA
9processor = AutoProcessor.from_pretrained("openvla/openvla-7b", trust_remote_code=True)
10vla = AutoModelForVision2Seq.from_pretrained(
11 "openvla/openvla-7b",
12 attn_implementation="flash_attention_2", # [Optional] Requires `flash_attn`
13 torch_dtype=torch.bfloat16,
14 low_cpu_mem_usage=True,
15 trust_remote_code=True
16).to("cuda:0")
17
18# Grab image input & format prompt
19image: Image.Image = get_from_camera(...)
20prompt = "In: What action should the robot take to {<INSTRUCTION>}?\nOut:"
21
22# Predict Action (7-DoF; un-normalize for BridgeV2)
23inputs = processor(prompt, image).to("cuda:0", dtype=torch.bfloat16)
24action = vla.predict_action(**inputs, unnorm_key="bridge_orig", do_sample=False)
25
26# Execute...
27robot.act(action, ...)1@article{kim24openvla,
2 title={OpenVLA: An Open-Source Vision-Language-Action Model},
3 author={{Moo Jin} Kim and Karl Pertsch and Siddharth Karamcheti and Ted Xiao and Ashwin Balakrishna and Suraj Nair and Rafael Rafailov and Ethan Foster and Grace Lam and Pannag Sanketi and Quan Vuong and Thomas Kollar and Benjamin Burchfiel and Russ Tedrake and Dorsa Sadigh and Sergey Levine and Percy Liang and Chelsea Finn},
4 journal = {arXiv preprint arXiv:2406.09246},
5 year={2024}
6}