Robotics
Transformers
Safetensors
English
openvla
feature-extraction
vla
image-text-to-text
multimodal
pretraining
custom_code
Run this model with HF Jobs
Run openvla/openvla-7b on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/openvla/openvla-7b. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/openvla/openvla-7b on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use openvla/openvla-7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openvla/openvla-7b with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForVision2Seq model = AutoModelForVision2Seq.from_pretrained("openvla/openvla-7b", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update modeling_prismatic.py to account for the case where `input_ids` is `None `
#5
by eliotj - opened
321 unmodified lines32232332432532632732830 unmodified lines359360361362363364365321 unmodified lines# => Multimodal Forward :: (pixel_values is not None) and (input_ids/embeds.shape[0] == pixel_values.shape[0])# === Handle Generation with Cache (`input_ids.shape[1] == 1`) =>> requires `past_keys_values` ===if input_ids.shape[1] == 1:assert input_ids.shape[0] == 1, "Generation is only currently supported for batch size of 1!"assert past_key_values is not None, "You must provide `past_key_values` during cached generation!"assert labels is None, "Unexpected key `labels` provided during cached generation!"30 unmodified lines)# === Handle Multimodal Forward ===elif (input_ids.shape[0] == pixel_values.shape[0]) or (inputs_embeds.shape[0] == pixel_values.shape[0]):assert past_key_values is None, "Unexpected key `past_key_values` provided during language-only forward!"# Visual Feature Extraction321 unmodified lines32232332432532632732830 unmodified lines359360361362363364365366367368321 unmodified lines# => Multimodal Forward :: (pixel_values is not None) and (input_ids/embeds.shape[0] == pixel_values.shape[0])# === Handle Generation with Cache (`input_ids.shape[1] == 1`) =>> requires `past_keys_values` ===if input_ids is not None and input_ids.shape[1] == 1:assert input_ids.shape[0] == 1, "Generation is only currently supported for batch size of 1!"assert past_key_values is not None, "You must provide `past_key_values` during cached generation!"assert labels is None, "Unexpected key `labels` provided during cached generation!"30 unmodified lines)# === Handle Multimodal Forward ===elif ((input_ids is not None and input_ids.shape[0] == pixel_values.shape[0]) or(inputs_embeds is not None and inputs_embeds.shape[0] == pixel_values.shape[0])):assert past_key_values is None, "Unexpected key `past_key_values` provided during language-only forward!"# Visual Feature Extraction
modeling_prismatic.py+5-2