Downloads · 30 days
2
7% of all-time downloads
kavinrajkrupsurge/openvla-lampe-4dof-finetuned
openvla-lampe-4dof-finetuned is a machine learning model from kavinrajkrupsurge. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This repository contains a fine-tuned MiniVLA model trained on the LAMPE dataset with 4-DoF actions (Base, Joint2, Joint3, Joint4).
Downloads · 30 days
2
7% of all-time downloads
All-time downloads
30
Public
Parameters
7.5B
15.6 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors15.6 GB · 100%
From the Hugging Face model README
This repository contains a fine-tuned MiniVLA model trained on the LAMPE dataset with 4-DoF actions (Base, Joint2, Joint3, Joint4).
openvla/openvla-7b# Install dependencies
pip install torch torchvision transformers peft accelerate
pip install huggingface_hub
pip install git+https://github.com/moojink/dlimp_openvla
from prismatic.models.load import load_vla
import torch
# Load the base model
model = load_vla(
"openvla/openvla-7b",
load_for_training=False,
)
# Load fine-tuned checkpoint
checkpoint = torch.load("checkpoints/step-003000-loss=0.9050.pt", map_location="cpu")
if "model_state_dict" in checkpoint:
model.load_state_dict(checkpoint["model_state_dict"], strict=False)
# Set to evaluation mode
model.eval()
from PIL import Image
# Load image and instruction
image = Image.open("path/to/image.jpg")
instruction = "turn left"
# Predict action
with torch.inference_mode():
action = model.predict_action(
image=image,
instruction=instruction,
unnorm_key="lampe_dataset_combined",
do_sample=False
)
print(f"Predicted action: {action}")
# Output: [Base, Joint2, Joint3, Joint4]
This repository includes the fine-tuning script (finetune.py) used to train this model.
python finetune.py \
--vla_path "openvla/openvla-7b" \
--data_root_dir "/path/to/rlds_dataset" \
--dataset_name "lampe_dataset_combined" \
--dataset_statistics_path "dataset_statistics.json" \
--batch_size 8 \
--max_steps 3000 \
--learning_rate 5e-4 \
--lora_rank 32 \
--lora_dropout 0.0 \
--wandb_mode "offline"
Or use the provided shell script:
bash finetune_lampe_combined.sh
Use the validate.py script to validate the model on sample data:
python validate.py
Update the paths in validate.py:
CHECKPOINT_DIR: Path to checkpoint directorySAMPLE_PATH: Path to sample data directoryThe dataset_statistics.json file contains normalization statistics for the LAMPE dataset:
{
"lampe_dataset_combined": {
"action": {
"mean": [...],
"std": [...],
"min": [...],
"max": [...],
"q01": [...],
"q99": [...]
},
"proprio": {...},
"num_transitions": 6289,
"num_trajectories": 80
}
}
finetune.py: Fine-tuning script with custom dataset supportvalidate.py: Validation script for model evaluationfinetune_lampe_combined.sh: Shell script for easy fine-tuningdataset_statistics.json: Dataset normalization statisticscheckpoints/: Model checkpoints from trainingadapter-weights/: LoRA adapter weights (if available)If you use this model, please cite:
@misc{minivla-lampe-4dof,
title={MiniVLA Fine-tuned on LAMPE 4-DoF Dataset},
author={Your Name},
year={2025},
url={https://huggingface.co/kavinrajkrupsurge/openvla-lampe-4dof-finetuned}
}
This model follows the license of the base model openvla/openvla-7b.
For questions or issues, please open an issue on the HuggingFace repository.