当前位置: 首页 > news >正文

下载安装运行测试开源vision-language-action(VLA)模型OpenVLA

1. 安装

项目官网OpenVLA
模型

首先按照官网提示的以下代码,执行创建环境->安装最小依赖->git克隆项目等

# Create and activate conda environment
conda create -n openvla python=3.10 -y
conda activate openvla# Install PyTorch. Below is a sample command to do this, but you should check the following link
# to find installation instructions that are specific to your compute platform:
# https://pytorch.org/get-started/locally/
conda install pytorch torchvision torchaudio pytorch-cuda=12.4 -c pytorch -c nvidia -y  # UPDATE ME!# Clone and install the openvla repo
git clone https://github.com/openvla/openvla.git
cd openvla
pip install -e .# Install Flash Attention 2 for training (https://github.com/Dao-AILab/flash-attention)
#   =>> If you run into difficulty, try `pip cache remove flash_attn` first
pip install packaging ninja
ninja --version; echo $?  # Verify Ninja --> should return exit code "0"
pip install "flash-attn==2.5.5" --no-build-isolation

下载openvla-7b模型到本地

hugging face镜像网站https://hf-mirror.com上下载
我用的是AutoDL,所以想直接把模型下载到远程的服务器上,操作如下。
(1)安装工具huggingface-cli

pip install -U huggingface_hub

(2)创建python脚本

import os
// 设置环境变量
os.environ['HF_ENDPOINT'] = 'https://hf-mirror.com'
// 下载模型
os.system('huggingface-cli download --resume-download HF上的模型名称 --local-dir 本地存放路径')
// 下载数据集
os.system('huggingface-cli download --repo-type dataset --resume-download HF上的数据集名称 --local-dir 本地存放路径')

例如,我只想下载openvla-7b这个模型,脚本如下

import os
# // 设置环境变量
os.environ['HF_ENDPOINT'] = 'https://hf-mirror.com'
# // 下载模型
os.system('huggingface-cli download --resume-download openvla/openvla-7b --local-dir /root/openvla/openvla7b')

执行上述脚本即可下载模型到本地,即时镜像也需要挺长时间。
在运行过程中,出现磁盘空间不够的问题导致下载终止!需要注意autodl中租用的实例中会自动分配30G系统盘+50G数据盘,如下图。其中/root/autodl-tmp为数据盘,除此之外的都认为是系统盘,一般创建的环境可以默认在系统盘,但是项目源码特别是模型(通常几十个G)在下载存放时要注意路径,如果不小心将模型放到系统盘(容量非常小,只有30G),很可能导致下载终止浪费掉几个小时时间!
手动删除系统盘的模型文件后,最后再清理一下磁盘AutoDL清理磁盘
在这里插入图片描述

2. 在BridgeData上微调OpenVLA

首先下载数据集,使用一下命令下载

# Change directory to your base datasets folder
cd <PATH TO BASE DATASETS DIR># Download the full dataset (124 GB)
wget -r -nH --cut-dirs=4 --reject="index.html*" https://rail.eecs.berkeley.edu/datasets/bridge_release/data/tfds/bridge_dataset/# Rename the dataset to `bridge_orig` (NOTE: Omitting this step may lead to runtime errors later)
mv bridge_dataset bridge_orig
http://www.lryc.cn/news/539147.html

相关文章:

  • 【网络安全 | 漏洞挖掘】我如何通过Cookie Manipulation发现主域上的关键PII?
  • 【操作系统】操作系统概述
  • SQL Server 运算符优先级
  • Python的顺序结构和循环结构
  • 深入浅出TypedArray:网络数据处理、WebGPU与加密实战
  • http 响应码影响 video 标签播放视频
  • 观察者模式原理详解以及Spring源码如何使用观察者模式?
  • 【Spring】Spring配置文件
  • MSI微星电脑冲锋坦克Pro Vector GP76 12UGS(MS-17K4)原厂Win11系统恢复镜像,含还原功能,预装OEM系统下载
  • Unity合批处理优化内存序列帧播放动画
  • 【Java】逻辑运算符详解:、|| 与、 | 的区别及应用
  • 深入解析 Flutter GetX
  • Java 大视界 -- 人才需求与培养:Java 大数据领域的职业发展路径(92)
  • 顺序表常用操作和笔试题
  • List<Map<String, Object>> 如何对某个字段求和
  • 2024亚马逊数据分析!
  • foobar2000设置DSP使用教程及软件推荐
  • Apache Logic4j 库反序列化漏洞复现与深度剖析
  • FPGA VIVADO:axi-lite 从机和主机
  • LabVIEW 中的 3dgraph.llb库
  • 【Linux】文件系统:文件fd
  • Vue学习记录19
  • MATLAB更改图论的布局:设置layout
  • 【分果果——DP(困难)】
  • 禁止WPS强制打开PDF文件
  • 罗技鼠标接收器丢了,怎么用另一个logi接收器重新配对?
  • ffmpeg configure 研究2:分析屏幕输出及文件输出的具体过程
  • 软件内有离线模型,效果也很实用......
  • Linux下ioctl的应用
  • 如何通过 prometheus-operator 实现服务发现