Image-Text-to-Text
Transformers
Safetensors
English
openvla
feature-extraction
robotics
vla
multimodal
pretraining
custom_code
Instructions to use openvla/openvla-7b-finetuned-libero-spatial with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openvla/openvla-7b-finetuned-libero-spatial with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="openvla/openvla-7b-finetuned-libero-spatial", trust_remote_code=True)# Load model directly from transformers import AutoModelForVision2Seq model = AutoModelForVision2Seq.from_pretrained("openvla/openvla-7b-finetuned-libero-spatial", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use openvla/openvla-7b-finetuned-libero-spatial with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "openvla/openvla-7b-finetuned-libero-spatial" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openvla/openvla-7b-finetuned-libero-spatial", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/openvla/openvla-7b-finetuned-libero-spatial
- SGLang
How to use openvla/openvla-7b-finetuned-libero-spatial with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "openvla/openvla-7b-finetuned-libero-spatial" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openvla/openvla-7b-finetuned-libero-spatial", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "openvla/openvla-7b-finetuned-libero-spatial" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openvla/openvla-7b-finetuned-libero-spatial", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use openvla/openvla-7b-finetuned-libero-spatial with Docker Model Runner:
docker model run hf.co/openvla/openvla-7b-finetuned-libero-spatial
| { | |
| "_name_or_path": "openvla/openvla-7b", | |
| "arch_specifier": "no-align+fused-gelu-mlp", | |
| "architectures": [ | |
| "OpenVLAForActionPrediction" | |
| ], | |
| "auto_map": { | |
| "AutoConfig": "openvla/openvla-7b--configuration_prismatic.OpenVLAConfig", | |
| "AutoModelForVision2Seq": "openvla/openvla-7b--modeling_prismatic.OpenVLAForActionPrediction" | |
| }, | |
| "hf_llm_id": "meta-llama/Llama-2-7b-hf", | |
| "image_resize_strategy": "resize-naive", | |
| "image_sizes": [ | |
| 224, | |
| 224 | |
| ], | |
| "llm_backbone_id": "llama2-7b-pure", | |
| "llm_max_length": 2048, | |
| "model_type": "openvla", | |
| "n_action_bins": 256, | |
| "norm_stats": { | |
| "libero_spatial": { | |
| "action": { | |
| "mean": [ | |
| 0.15312479436397552, | |
| 0.13707277178764343, | |
| -0.15526802837848663, | |
| -0.005176450591534376, | |
| -0.01120874285697937, | |
| -0.020194264128804207, | |
| 0.4578818082809448 | |
| ], | |
| "std": [ | |
| 0.41272708773612976, | |
| 0.34724321961402893, | |
| 0.50869220495224, | |
| 0.037266165018081665, | |
| 0.07244449853897095, | |
| 0.05762382969260216, | |
| 0.49827873706817627 | |
| ], | |
| "max": [ | |
| 0.9375, | |
| 0.9375, | |
| 0.9375, | |
| 0.1971428543329239, | |
| 0.33642858266830444, | |
| 0.375, | |
| 1.0 | |
| ], | |
| "min": [ | |
| -0.9375, | |
| -0.9375, | |
| -0.9375, | |
| -0.1875, | |
| -0.3675000071525574, | |
| -0.36000001430511475, | |
| 0.0 | |
| ], | |
| "q01": [ | |
| -0.7454732114076613, | |
| -0.6616071462631226, | |
| -0.9375, | |
| -0.1071428582072258, | |
| -0.20678570866584778, | |
| -0.1842857152223587, | |
| 0.0 | |
| ], | |
| "q99": [ | |
| 0.9375, | |
| 0.8758928775787354, | |
| 0.9321428537368774, | |
| 0.1039285734295845, | |
| 0.17678570747375488, | |
| 0.14571428298950195, | |
| 1.0 | |
| ], | |
| "mask": [ | |
| true, | |
| true, | |
| true, | |
| true, | |
| true, | |
| true, | |
| false | |
| ] | |
| }, | |
| "proprio": { | |
| "mean": [ | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0 | |
| ], | |
| "std": [ | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0 | |
| ], | |
| "max": [ | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0 | |
| ], | |
| "min": [ | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0 | |
| ], | |
| "q01": [ | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0 | |
| ], | |
| "q99": [ | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0 | |
| ] | |
| }, | |
| "num_transitions": 52970, | |
| "num_trajectories": 432 | |
| } | |
| }, | |
| "output_projector_states": false, | |
| "pad_to_multiple_of": 64, | |
| "pad_token_id": 32000, | |
| "text_config": { | |
| "model_type": "llama", | |
| "pad_token_id": 32000, | |
| "torch_dtype": "bfloat16", | |
| "vocab_size": 32064 | |
| }, | |
| "timm_model_ids": [ | |
| "vit_large_patch14_reg4_dinov2.lvd142m", | |
| "vit_so400m_patch14_siglip_224" | |
| ], | |
| "timm_override_act_layers": [ | |
| null, | |
| null | |
| ], | |
| "torch_dtype": "bfloat16", | |
| "transformers_version": "4.40.1", | |
| "use_fused_vision_backbone": true, | |
| "vision_backbone_id": "dinosiglip-vit-so-224px" | |
| } | |