So I did not use git clone to download the model like openvla/openvla-7b. But using from_pretrained() and relative path “openvla/openvla-7b” directly. The files are deposited into .cache/huggingface/hub/ file. How can I change it into original format which I could use the direct path to get inference.
1 Like
I recommend snapshot_download
for that purpose.
from huggingface_hub import snapshot_download
snapshot_download(repo_id="openvla/openvla-7b")
Or
from transformers import AutoModelForVision2Seq, AutoProcessor
repo_id = "openvla/openvla-7b"
save_dir = "openvla-7b"
model = AutoModelForVision2Seq.from_pretrained(repo_id)
processor = AutoProcessor.from_pretrained(repo_id)
model.save_pretrained(save_dir)
processor.save_pretrained(save_dir)
1 Like