smolVLA的运行方法

参考文档

https://github.com/huggingface/lerobot?tab=readme-ov-file

1、创建环境

conda create -y -n lerobot python=3.10
conda activate lerobot
conda install ffmpeg=7.1.1 -c conda-forge
git clone https://github.com/huggingface/lerobot.git
cd lerobot
pip install -e .
pip install -e ".[aloha, pusht,smolvla]"

2、下载数据集

smloVLA数据集下载地址

  • 下载预训练权重(lerobot/smolvla_base)地址:
    https://huggingface.co/lerobot/smolvla_base/tree/main
  • 下载数据集地址(lerobot/svla_so100_stacking)地址:
    https://huggingface.co/datasets/lerobot/svla_so100_stacking/tree/main

ACT数据集下载地址

  • 下载数据集(act_aloha_sim_insertion_human)地址
    https://huggingface.co/lerobot/act_aloha_sim_insertion_human

3、训练指令

微调指令

python lerobot/scripts/train.py \ 
  --policy.path=lerobot/smolvla_base \  # 预训练模型
  --dataset.repo_id=lerobot/svla_so100_stacking \
  --batch_size=64 \
  --steps=20000  # 10% of training budget

重新训练指令

  • smolvla训练指令
# 跳转到src目录
cd src
# 设置 Hugging Face 镜像
export HF_ENDPOINT=https://hf-mirror.com
# 启动指令
python lerobot/scripts/train.py \
  --policy.type=smolvla \
  --dataset.repo_id=/home/apulis-dev/userdata/lerobot/lerobot/svla_so100_stacking \  # [act,diffusion,smolvla]
  --batch_size=32 \
  --steps=200000
  --policy.repo_id=/home/apulis-dev/userdata/lerobot/lerobot/outputs
  • act 训练指令
lerobot-train \
    --policy.type=act \
    --dataset.repo_id=lerobot/aloha_sim_insertion_human \
    --env.type=aloha \
    --output_dir=outputs/train/act_aloha_insertion

4、推理指令

  • smolvla的推理指令
pip install gym-aloha
lerobot-eval \
    --policy.path={OUTPUT_DIR}/checkpoints/last/pretrained_model \
    --env.type=aloha \   # [aloha,pusht,smolvla]
    --eval.batch_size=10 \
    --eval.n_episodes=10 \
    --policy.use_amp=false \
    --policy.device=cuda
  • act的推理指令
lerobot-eval \
    --policy.path={OUTPUT_DIR}/checkpoints/last/pretrained_model \
    --env.type=aloha \   # [aloha,pusht,smolvla]
    --eval.batch_size=10 \
    --eval.n_episodes=10 \
    --policy.use_amp=false \
    --policy.device=cuda

5、环境列表

代码版本tag : v0.3.3

name: lerobot
channels:
  - defaults
  - conda-forge
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - alsa-lib=1.2.14=hb9d3cd8_0
  - aom=3.9.1=hac33072_0
  - attr=2.5.1=h166bdaf_1
  - av=15.0.0=py310h763a513_0
  - bzip2=1.0.8=h5eee18b_6
  - ca-certificates=2025.8.3=hbd8a1cb_0
  - cairo=1.18.4=h3394656_0
  - dav1d=1.2.1=hd590300_0
  - dbus=1.16.2=h3c4dab8_0
  - expat=2.7.1=h6a678d5_0
  - ffmpeg=7.1.1=gpl_hdb733cf_908
  - font-ttf-dejavu-sans-mono=2.37=hab24e00_0
  - font-ttf-inconsolata=3.000=h77eed37_0
  - font-ttf-source-code-pro=2.038=h77eed37_0
  - font-ttf-ubuntu=0.83=h77eed37_3
  - fontconfig=2.15.0=h7e30c49_1
  - fonts-conda-ecosystem=1=0
  - fonts-conda-forge=1=0
  - freetype=2.13.3=ha770c72_1
  - fribidi=1.0.10=h36c2ea0_0
  - gdk-pixbuf=2.42.12=h2b0a6b4_3
  - gettext=0.25.1=h3f43e3d_1
  - gettext-tools=0.25.1=h3f43e3d_1
  - giflib=5.2.2=hd590300_0
  - gmp=6.3.0=hac33072_2
  - graphite2=1.3.14=hecca717_2
  - harfbuzz=11.4.3=h15599e2_0
  - icu=75.1=he02047a_0
  - lame=3.100=h166bdaf_1003
  - lcms2=2.17=h717163a_0
  - ld_impl_linux-64=2.44=h1423503_1
  - lerc=4.0.0=h0aef613_1
  - level-zero=1.24.1=hb700be7_0
  - libabseil=20250512.1=cxx17_hba17884_0
  - libasprintf=0.25.1=h3f43e3d_1
  - libasprintf-devel=0.25.1=h3f43e3d_1
  - libass=0.17.4=h96ad9f0_0
  - libblas=3.9.0=34_h59b9bed_openblas
  - libcap=2.75=h39aace5_0
  - libcblas=3.9.0=34_he106b2a_openblas
  - libdeflate=1.22=hb9d3cd8_0
  - libdrm=2.4.125=hb9d3cd8_0
  - libegl=1.7.0=ha4b6fd6_2
  - libexpat=2.7.1=hecca717_0
  - libffi=3.4.6=h2dba641_1
  - libflac=1.4.3=h59595ed_0
  - libfreetype=2.13.3=ha770c72_1
  - libfreetype6=2.13.3=h48d6fc4_1
  - libgcc=15.1.0=h767d61c_4
  - libgcc-ng=15.1.0=h69a702a_4
  - libgcrypt-lib=1.11.1=hb9d3cd8_0
  - libgettextpo=0.25.1=h3f43e3d_1
  - libgettextpo-devel=0.25.1=h3f43e3d_1
  - libgfortran=15.1.0=h69a702a_4
  - libgfortran5=15.1.0=hcea5267_4
  - libgl=1.7.0=ha4b6fd6_2
  - libglib=2.84.3=hf39c6af_0
  - libglvnd=1.7.0=ha4b6fd6_2
  - libglx=1.7.0=ha4b6fd6_2
  - libgomp=15.1.0=h767d61c_4
  - libgpg-error=1.55=h3f2d84a_0
  - libhwloc=2.12.1=default_h3d81e11_1000
  - libiconv=1.18=h3b78370_2
  - libjpeg-turbo=3.1.1=hb25bd0a_0
  - liblapack=3.9.0=34_h7ac8fdf_openblas
  - liblzma=5.8.1=hb9d3cd8_2
  - liblzma-devel=5.8.1=hb9d3cd8_2
  - libnsl=2.0.1=hb9d3cd8_1
  - libogg=1.3.5=hd0c01bc_1
  - libopenblas=0.3.30=pthreads_h94d23a6_2
  - libopenvino=2025.2.0=hb617929_1
  - libopenvino-auto-batch-plugin=2025.2.0=hed573e4_1
  - libopenvino-auto-plugin=2025.2.0=hed573e4_1
  - libopenvino-hetero-plugin=2025.2.0=hd41364c_1
  - libopenvino-intel-cpu-plugin=2025.2.0=hb617929_1
  - libopenvino-intel-gpu-plugin=2025.2.0=hb617929_1
  - libopenvino-intel-npu-plugin=2025.2.0=hb617929_1
  - libopenvino-ir-frontend=2025.2.0=hd41364c_1
  - libopenvino-onnx-frontend=2025.2.0=h1862bb8_1
  - libopenvino-paddle-frontend=2025.2.0=h1862bb8_1
  - libopenvino-pytorch-frontend=2025.2.0=hecca717_1
  - libopenvino-tensorflow-frontend=2025.2.0=h0767aad_1
  - libopenvino-tensorflow-lite-frontend=2025.2.0=hecca717_1
  - libopus=1.5.2=hd0c01bc_0
  - libpciaccess=0.18=hb9d3cd8_0
  - libpng=1.6.50=h421ea60_1
  - libprotobuf=6.31.1=h9ef548d_1
  - librsvg=2.58.4=he92a37e_3
  - libsndfile=1.2.2=hc60ed4a_1
  - libsqlite=3.50.4=h0c1763c_0
  - libstdcxx=15.1.0=h8f9b012_4
  - libstdcxx-ng=15.1.0=h4852527_4
  - libsystemd0=257.7=h4e0b6ca_0
  - libtheora=1.1.1=h4ab18f5_1006
  - libtiff=4.7.0=hc4654cb_2
  - libudev1=257.7=hbe16f8c_0
  - libunwind=1.8.2=h1441ba7_0
  - liburing=2.11=h84d6215_0
  - libusb=1.0.29=h73b1eb8_0
  - libuuid=2.38.1=h0b41bf4_0
  - libva=2.22.0=h4f16b4b_2
  - libvorbis=1.3.7=h54a6638_2
  - libvpx=1.14.1=hac33072_0
  - libwebp-base=1.6.0=hd42ef1d_0
  - libxcb=1.17.0=h9b100fa_0
  - libxcrypt=4.4.36=hd590300_1
  - libxkbcommon=1.11.0=he8b52b9_0
  - libxml2=2.13.8=h04c0eec_1
  - libzlib=1.3.1=hb9d3cd8_2
  - lz4-c=1.10.0=h5888daf_1
  - mpg123=1.32.9=hc50e24c_0
  - ncurses=6.5=h7934f7d_0
  - numpy=2.2.6=py310hefbff90_0
  - ocl-icd=2.3.3=hb9d3cd8_0
  - opencl-headers=2025.06.13=h5888daf_0
  - openh264=2.6.0=hc22cd8d_0
  - openjpeg=2.5.2=h0d4d230_1
  - openssl=3.5.2=h26f9b46_0
  - pango=1.56.4=hadf4263_0
  - pcre2=10.45=hc749103_0
  - pillow=10.4.0=py310he228d35_1
  - pixman=0.46.4=h54a6638_1
  - pthread-stubs=0.4=hb9d3cd8_1002
  - pugixml=1.15=h3f63f65_0
  - pulseaudio-client=17.0=hac146a9_1
  - python=3.10.18=hd6af730_0_cpython
  - python_abi=3.10=6_cp310
  - readline=8.3=hc2a1206_0
  - sdl2=2.32.54=h3f2d84a_0
  - sdl3=3.2.20=h68140b3_0
  - snappy=1.2.2=h03e3b7b_0
  - svt-av1=3.1.1=hecca717_0
  - tbb=2022.2.0=hb60516a_1
  - tk=8.6.13=noxft_hd72426e_102
  - wayland=1.24.0=h3e06ad9_0
  - wayland-protocols=1.45=hd8ed1ab_0
  - wheel=0.45.1=py310h06a4308_0
  - x264=1!164.3095=h166bdaf_2
  - x265=3.5=h924138e_3
  - xkeyboard-config=2.45=hb9d3cd8_0
  - xorg-libice=1.1.2=hb9d3cd8_0
  - xorg-libsm=1.2.6=he73a12e_0
  - xorg-libx11=1.8.12=h9b100fa_1
  - xorg-libxau=1.0.12=h9b100fa_0
  - xorg-libxcursor=1.2.3=hb9d3cd8_0
  - xorg-libxdmcp=1.1.5=h9b100fa_0
  - xorg-libxext=1.3.6=hb9d3cd8_0
  - xorg-libxfixes=6.0.1=hb9d3cd8_0
  - xorg-libxrender=0.9.12=hb9d3cd8_0
  - xorg-libxscrnsaver=1.2.4=hb9d3cd8_0
  - xorg-xorgproto=2024.1=h5eee18b_1
  - xz=5.8.1=hbcc6ac9_2
  - xz-gpl-tools=5.8.1=hbcc6ac9_2
  - xz-tools=5.8.1=hb9d3cd8_2
  - zstd=1.5.7=hb8e6e7a_2
  - pip:
      - absl-py==2.3.1
      - accelerate==1.10.1
      - aiohappyeyeballs==2.6.1
      - aiohttp==3.12.15
      - aiosignal==1.4.0
      - annotated-types==0.7.0
      - antlr4-python3-runtime==4.9.3
      - appdirs==1.4.4
      - asciitree==0.3.3
      - async-timeout==5.0.1
      - attrs==25.3.0
      - beautifulsoup4==4.13.5
      - blinker==1.9.0
      - certifi==2025.8.3
      - cffi==1.17.1
      - charset-normalizer==3.4.3
      - click==8.2.1
      - cloudpickle==3.1.1
      - cmake==4.1.0
      - cython==3.1.3
      - datasets==3.6.0
      - decorator==4.4.2
      - deepdiff==8.6.0
      - diffusers==0.35.1
      - dill==0.3.8
      - dm-env==1.6
      - dm-tree==0.1.9
      - docker-pycreds==0.4.0
      - docopt==0.6.2
      - draccus==0.10.0
      - einops==0.8.1
      - etils==1.13.0
      - evdev==1.9.2
      - farama-notifications==0.0.4
      - fasteners==0.20
      - filelock==3.19.1
      - flask==3.1.2
      - frozenlist==1.7.0
      - fsspec==2025.3.0
      - gdown==5.2.0
      - gitdb==4.0.12
      - gitpython==3.1.45
      - glfw==2.9.0
      - gym==0.26.2
      - gym-notices==0.1.0
      - gymnasium==0.29.1
      - h5py==3.14.0
      - hf-transfer==0.1.9
      - hf-xet==1.1.8
      - huggingface-hub==0.34.4
      - hydra-core==1.3.2
      - idna==3.10
      - imageio==2.37.0
      - imageio-ffmpeg==0.6.0
      - importlib-metadata==8.7.0
      - importlib-resources==6.5.2
      - inquirerpy==0.3.4
      - itsdangerous==2.2.0
      - jinja2==3.1.6
      - jsonlines==4.0.0
      - lazy-loader==0.4
      - lerobot==0.3.4
      - llvmlite==0.42.0
      - markupsafe==3.0.2
      - mergedeep==1.3.4
      - moviepy==1.0.3
      - mpmath==1.3.0
      - mujoco==3.3.5
      - mujoco-py==2.1.2.14
      - multidict==6.6.4
      - multiprocess==0.70.16
      - mypy-extensions==1.1.0
      - networkx==3.4.2
      - num2words==0.5.14
      - numba==0.59.1
      - numcodecs==0.13.1
      - nvidia-cublas-cu12==12.6.4.1
      - nvidia-cuda-cupti-cu12==12.6.80
      - nvidia-cuda-nvrtc-cu12==12.6.77
      - nvidia-cuda-runtime-cu12==12.6.77
      - nvidia-cudnn-cu12==9.5.1.17
      - nvidia-cufft-cu12==11.3.0.4
      - nvidia-cufile-cu12==1.11.1.6
      - nvidia-curand-cu12==10.3.7.77
      - nvidia-cusolver-cu12==11.7.1.2
      - nvidia-cusparse-cu12==12.5.4.2
      - nvidia-cusparselt-cu12==0.6.3
      - nvidia-nccl-cu12==2.26.2
      - nvidia-nvjitlink-cu12==12.6.85
      - nvidia-nvtx-cu12==12.6.77
      - omegaconf==2.3.0
      - opencv-python==4.11.0.86
      - opencv-python-headless==4.12.0.88
      - orderly-set==5.5.0
      - orjson==3.11.2
      - packaging==25.0
      - pandas==2.3.2
      - pfzy==0.3.4
      - pip==25.2
      - platformdirs==4.4.0
      - prettytable==3.16.0
      - proglog==0.1.12
      - prompt-toolkit==3.0.52
      - propcache==0.3.2
      - protobuf==4.25.8
      - psutil==7.0.0
      - pyarrow==21.0.0
      - pycparser==2.22
      - pydantic==2.11.7
      - pydantic-core==2.33.2
      - pygame==2.6.1
      - pymunk==6.11.1
      - pynput==1.8.1
      - pyopengl==3.1.10
      - pyserial==3.5
      - pysocks==1.7.1
      - python-dateutil==2.9.0.post0
      - python-xlib==0.33
      - pytz==2025.2
      - pyyaml==6.0.2
      - pyyaml-include==1.4.1
      - regex==2025.7.34
      - requests==2.32.5
      - rerun-sdk==0.22.1
      - safetensors==0.6.2
      - scikit-image==0.22.0
      - scipy==1.15.3
      - sentry-sdk==2.35.0
      - setproctitle==1.3.6
      - setuptools==80.9.0
      - shapely==2.1.1
      - six==1.17.0
      - smmap==5.0.2
      - soupsieve==2.7
      - sympy==1.14.0
      - tensordict==0.7.2
      - termcolor==2.5.0
      - tifffile==2025.5.10
      - tokenizers==0.21.4
      - toml==0.10.2
      - torch==2.7.1
      - torchcodec==0.5
      - torchrl==0.7.2
      - torchvision==0.22.1
      - tqdm==4.67.1
      - transformers==4.51.3
      - triton==3.3.1
      - typing-extensions==4.14.1
      - typing-inspect==0.9.0
      - typing-inspection==0.4.1
      - tzdata==2025.2
      - urllib3==2.5.0
      - wandb==0.21.3
      - wcwidth==0.2.13
      - werkzeug==3.1.3
      - wrapt==1.17.3
      - xxhash==3.5.0
      - yarl==1.20.1
      - zarr==2.18.3
      - zipp==3.23.0
prefix: /opt/conda/private/envs/lerobot

Logo

立足具身智能前沿赛道,致力于搭建全球化、开源化、全栈式技术交流与实践共创平台。

更多推荐