| TASK=spatial # or object / goal / 10 / 90 | |
| VERSION=21.4 | |
| PT_CKPT="checkpoints/openvla_base" | |
| TASK_MODEL_CHECKPOINT="checkpoints/task_models/SF_${TASK}" | |
| REFERENCE_MODEL_CHECKPOINT="checkpoints/reference_models/openvla_oft_libero_${TASK}" | |
| VECTOR_SAVE_PATH="checkpoints/feature_vectors/feature_vector_with_SF_${TASK}_v${VERSION}.pth" | |
| INITIALIZED_PT_VLA_PATH="checkpoints/initialized_pt_vla/initailized_openvla_with_SF_${TASK}_v${VERSION}" | |
| TASK_SUITE_NAME="libero_${TASK}" | |
| python interpolate.py \ | |
| --pretrained_checkpoint "$TASK_MODEL_CHECKPOINT" \ | |
| --original_pretrained_checkpoint "$REFERENCE_MODEL_CHECKPOINT" \ | |
| --vector_save_path "$VECTOR_SAVE_PATH" \ | |
| --initialized_pt_vla_path $INITIALIZED_PT_VLA_PATH \ | |
| --pt_ckpt $PT_CKPT\ | |
| --feature_vector_weight 0.5 \ | |
| --task_suite_name $TASK_SUITE_NAME | |
| #the code below is used to transplant the model parameters except for the vla backbone, such as processor and tokenizer, so that the initialized model is complete | |
| rsync -av \ | |
| --ignore-existing \ | |
| --exclude='*.safetensors' \ | |
| --exclude='*.back.*' \ | |
| $PT_CKPT/ \ | |
| $INITIALIZED_PT_VLA_PATH/ | |