skaramcheti
commited on
Commit
•
742ce85
1
Parent(s):
d6e88ec
Update README.md
Browse files
README.md
CHANGED
@@ -1,199 +1,97 @@
|
|
1 |
---
|
2 |
library_name: transformers
|
3 |
-
tags:
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
---
|
5 |
|
6 |
-
#
|
7 |
|
8 |
-
|
|
|
9 |
|
|
|
|
|
10 |
|
|
|
11 |
|
12 |
-
## Model
|
13 |
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
- **
|
22 |
-
- **
|
23 |
-
- **
|
24 |
-
- **
|
25 |
-
- **License:** [More Information Needed]
|
26 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
27 |
-
|
28 |
-
### Model Sources [optional]
|
29 |
-
|
30 |
-
<!-- Provide the basic links for the model. -->
|
31 |
-
|
32 |
-
- **Repository:** [More Information Needed]
|
33 |
-
- **Paper [optional]:** [More Information Needed]
|
34 |
-
- **Demo [optional]:** [More Information Needed]
|
35 |
|
36 |
## Uses
|
37 |
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
43 |
-
|
44 |
-
[More Information Needed]
|
45 |
-
|
46 |
-
### Downstream Use [optional]
|
47 |
-
|
48 |
-
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
49 |
-
|
50 |
-
[More Information Needed]
|
51 |
-
|
52 |
-
### Out-of-Scope Use
|
53 |
-
|
54 |
-
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
55 |
-
|
56 |
-
[More Information Needed]
|
57 |
-
|
58 |
-
## Bias, Risks, and Limitations
|
59 |
-
|
60 |
-
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
61 |
-
|
62 |
-
[More Information Needed]
|
63 |
-
|
64 |
-
### Recommendations
|
65 |
-
|
66 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
67 |
-
|
68 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
69 |
-
|
70 |
-
## How to Get Started with the Model
|
71 |
-
|
72 |
-
Use the code below to get started with the model.
|
73 |
-
|
74 |
-
[More Information Needed]
|
75 |
-
|
76 |
-
## Training Details
|
77 |
-
|
78 |
-
### Training Data
|
79 |
-
|
80 |
-
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
81 |
-
|
82 |
-
[More Information Needed]
|
83 |
-
|
84 |
-
### Training Procedure
|
85 |
-
|
86 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
87 |
-
|
88 |
-
#### Preprocessing [optional]
|
89 |
-
|
90 |
-
[More Information Needed]
|
91 |
-
|
92 |
-
|
93 |
-
#### Training Hyperparameters
|
94 |
-
|
95 |
-
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
96 |
-
|
97 |
-
#### Speeds, Sizes, Times [optional]
|
98 |
|
99 |
-
|
|
|
|
|
100 |
|
101 |
-
|
|
|
102 |
|
103 |
-
##
|
104 |
|
105 |
-
|
|
|
106 |
|
107 |
-
|
|
|
|
|
|
|
|
|
108 |
|
109 |
-
|
110 |
|
111 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
|
113 |
-
|
|
|
|
|
114 |
|
115 |
-
|
|
|
|
|
116 |
|
117 |
-
|
|
|
|
|
118 |
|
119 |
-
[
|
120 |
|
121 |
-
|
122 |
-
|
123 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
124 |
-
|
125 |
-
[More Information Needed]
|
126 |
-
|
127 |
-
### Results
|
128 |
-
|
129 |
-
[More Information Needed]
|
130 |
-
|
131 |
-
#### Summary
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
## Model Examination [optional]
|
136 |
-
|
137 |
-
<!-- Relevant interpretability work for the model goes here -->
|
138 |
-
|
139 |
-
[More Information Needed]
|
140 |
-
|
141 |
-
## Environmental Impact
|
142 |
-
|
143 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
144 |
-
|
145 |
-
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
146 |
-
|
147 |
-
- **Hardware Type:** [More Information Needed]
|
148 |
-
- **Hours used:** [More Information Needed]
|
149 |
-
- **Cloud Provider:** [More Information Needed]
|
150 |
-
- **Compute Region:** [More Information Needed]
|
151 |
-
- **Carbon Emitted:** [More Information Needed]
|
152 |
-
|
153 |
-
## Technical Specifications [optional]
|
154 |
-
|
155 |
-
### Model Architecture and Objective
|
156 |
-
|
157 |
-
[More Information Needed]
|
158 |
-
|
159 |
-
### Compute Infrastructure
|
160 |
-
|
161 |
-
[More Information Needed]
|
162 |
-
|
163 |
-
#### Hardware
|
164 |
-
|
165 |
-
[More Information Needed]
|
166 |
-
|
167 |
-
#### Software
|
168 |
-
|
169 |
-
[More Information Needed]
|
170 |
-
|
171 |
-
## Citation [optional]
|
172 |
-
|
173 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
174 |
|
175 |
**BibTeX:**
|
176 |
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
186 |
-
|
187 |
-
[More Information Needed]
|
188 |
-
|
189 |
-
## More Information [optional]
|
190 |
-
|
191 |
-
[More Information Needed]
|
192 |
-
|
193 |
-
## Model Card Authors [optional]
|
194 |
-
|
195 |
-
[More Information Needed]
|
196 |
-
|
197 |
-
## Model Card Contact
|
198 |
-
|
199 |
-
[More Information Needed]
|
|
|
1 |
---
|
2 |
library_name: transformers
|
3 |
+
tags:
|
4 |
+
- robotics
|
5 |
+
- multimodal
|
6 |
+
license: mit
|
7 |
+
language:
|
8 |
+
- en
|
9 |
+
pipeline_tag: image-text-to-text
|
10 |
---
|
11 |
|
12 |
+
# OpenVLA 7B
|
13 |
|
14 |
+
OpenVLA 7B (`openvla-7b`) is an open vision-language-action model trained on 970K robot manipulation episodes from the [Open X-Embodiment](https://robotics-transformer-x.github.io/) dataset.
|
15 |
+
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.
|
16 |
|
17 |
+
All OpenVLA checkpoints are released under an MIT License. We additionally release our [pretraining and fine-tuning codebase](https://github.com/openvla/openvla) under
|
18 |
+
the same license.
|
19 |
|
20 |
+
For full details of our model and pretraining procedure please read [our paper](https://openvla.github.io/) and see [our project page](https://openvla.github.io/).
|
21 |
|
22 |
+
## Model Summary
|
23 |
|
24 |
+
- **Developed by:** The OpenVLA team consisting of researchers from Stanford, UC Berkeley, Google Deepmind, and the Toyota Research Institute.
|
25 |
+
- **Model type:** Vision-language-action (language, image --> robot actions)
|
26 |
+
- **Language(s) (NLP):** en
|
27 |
+
- **License:** MIT
|
28 |
+
- **Finetuned from:** [`prism-dinosiglip-224px`](https://github.com/TRI-ML/prismatic-vlms), a VLM trained from:
|
29 |
+
+ **Vision Backbone**: DINOv2 ViT-L/14 and SigLIP ViT-So400M/14
|
30 |
+
+ **Language Model**: Llama-2
|
31 |
+
- **Pretraining Dataset:** [Open X-Embodiment](https://robotics-transformer-x.github.io/) -- specific component datasets can be found [here](https://github.com/openvla/openvla).
|
32 |
+
- **Repository:** [https://github.com/openvla/openvla](https://github.com/openvla/openvla)
|
33 |
+
- **Paper:** [OpenVLA: An Open-Source Vision-Language-Action Model](https://openvla.github.io/)
|
34 |
+
- **Project Page & Videos:** [https://openvla.github.io/](https://openvla.github.io/)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
## Uses
|
37 |
|
38 |
+
OpenVLA models take a language instruction and a camera image of a robot workspace as input, and predict (normalized) robot actions consisting of 7-DoF end-effector deltas
|
39 |
+
of the form (x, y, z, roll, pitch, yaw, gripper). To execute on an actual robot platform, actions need to be *un-normalized* subject to statistics computed on a per-robot,
|
40 |
+
per-dataset basis. See [our repository](https://github.com/openvla/openvla) for more information.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
|
42 |
+
OpenVLA models can be used zero-shot to control robots for specific combinations of embodiments and domains seen in the Open-X pretraining mixture (e.g., for
|
43 |
+
[BridgeV2 environments with a Widow-X robot](https://rail-berkeley.github.io/bridgedata/)). They can also be efficiently *fine-tuned* for new tasks and robot setups
|
44 |
+
given minimal demonstration data; [we provide example scripts for full and parameter-efficient finetuning](https://github.com/openvla/openvla/blob/main/scripts/finetune.py).
|
45 |
|
46 |
+
**Out-of-Scope:** OpenVLA models do not zero-shot generalize to new (unseen) robot embodiments, or setups that are not represented in the pretraining mix; in these cases,
|
47 |
+
we suggest collecting a dataset of demonstrations on the desired setup, and fine-tuning OpenVLA models instead.
|
48 |
|
49 |
+
## Getting Started
|
50 |
|
51 |
+
OpenVLA 7B can be used to control multiple robots for domains represented in the pretraining mixture out-of-the-box. For example,
|
52 |
+
here is an example for loading `openvla-7b` for zero-shot instruction following in the [BridgeV2 environments] with a Widow-X robot:
|
53 |
|
54 |
+
```python
|
55 |
+
# Install minimal dependencies (`torch`, `transformers`, `timm`, `tokenizers`, ...)
|
56 |
+
# > pip install -r https://raw.githubusercontent.com/openvla/openvla/main/requirements-min.txt
|
57 |
+
from transformers import AutoModelForVision2Seq, AutoProcessor
|
58 |
+
from PIL import Image
|
59 |
|
60 |
+
import torch
|
61 |
|
62 |
+
# Load Processor & VLA
|
63 |
+
processor = AutoProcessor.from_pretrained("openvla/openvla-7b", trust_remote_code=True)
|
64 |
+
vla = AutoModelForVision2Seq.from_pretrained(
|
65 |
+
"openvla/openvla-7b",
|
66 |
+
attn_implementation="flash_attention_2", # [Optional] Requires `flash_attn`
|
67 |
+
torch_dtype=torch.bfloat16,
|
68 |
+
low_cpu_mem_usage=True,
|
69 |
+
trust_remote_code=True
|
70 |
+
).to("cuda:0")
|
71 |
|
72 |
+
# Grab image input & format prompt
|
73 |
+
image: Image.Image = get_from_camera(...)
|
74 |
+
prompt = "In: What action should the robot take to {<INSTRUCTION>}?\nOut:"
|
75 |
|
76 |
+
# Predict Action (7-DoF; un-normalize for BridgeV2)
|
77 |
+
inputs = processor(prompt, image).to("cuda:0", dtype=torch.bfloat16)
|
78 |
+
action = vla.predict_action(**inputs, unnorm_key="bridge_orig", do_sample=False)
|
79 |
|
80 |
+
# Execute...
|
81 |
+
robot.act(action, ...)
|
82 |
+
```
|
83 |
|
84 |
+
For more examples, including scripts for fine-tuning OpenVLA models on your own robot demonstration datasets, see [our training repository](https://github.com/openvla/openvla).
|
85 |
|
86 |
+
## Citation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
|
88 |
**BibTeX:**
|
89 |
|
90 |
+
```bibtex
|
91 |
+
@article{kim24openvla,
|
92 |
+
title={OpenVLA: An Open-Source Vision-Language-Action Model},
|
93 |
+
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},
|
94 |
+
journal = {arXiv preprint},
|
95 |
+
year={2024}
|
96 |
+
}
|
97 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|