6.3 SmolVLA 训练
6.3 SmolVLA 训练
SmolVLA 是轻量级视觉-语言-动作模型,需从 HuggingFace 下载预训练权重。
显存-batch_size 对应
| 显存 | 建议 batch_size |
|---|---|
| 24GB | 64 |
| 12GB | 32~40 |
| 8GB | 28 以内 |
中国大陆用户
必须设置 HuggingFace 镜像,否则下载模型权重会失败。
安装 SmolVLA 并训练
linux: pip install -e ".[smolvla]"
export HF_ENDPOINT=https://hf-mirror.com # 中国大陆用户
lerobot-train \
--dataset.repo_id=${HF_USER}/so101_test \
--policy.push_to_hub=false \
--policy.type=smolvla \
--policy.device=cuda \
--output_dir=outputs/train/smolvla_test \
--job_name=smolvla_test \
--batch_size=64 \
--steps=20000 \
--wandb.enable=false
macos: pip install -e ".[smolvla]"
export HF_ENDPOINT=https://hf-mirror.com # 中国大陆用户
lerobot-train \
--dataset.repo_id=${HF_USER}/so101_test \
--policy.push_to_hub=false \
--policy.type=smolvla \
--policy.device=cuda \
--output_dir=outputs/train/smolvla_test \
--job_name=smolvla_test \
--batch_size=64 \
--steps=20000 \
--wandb.enable=false
windows: pip install -e ".[smolvla]"
$env:HF_ENDPOINT="https://hf-mirror.com" # 中国大陆用户
lerobot-train `
--dataset.repo_id=${HF_USER}/so101_test `
--policy.push_to_hub=false `
--policy.type=smolvla `
--policy.device=cuda `
--output_dir=outputs/train/smolvla_test `
--job_name=smolvla_test `
--batch_size=64 `
--steps=20000 `
--wandb.enable=false