docs(evo1): add setup notes and keep only 4gpu config

这个提交包含在:
javadcc_mac
2026-03-23 20:58:14 +08:00
父节点 0ea4c31331
当前提交 c7e3466a23
共有 2 个文件被更改,包括 114 次插入 和 16 次删除

查看文件

@ -0,0 +1,114 @@
# EVO1 Notes
This directory contains the Evo1 policy integration for LeRobot/Evo-RL.
## Extra Dependencies
Compared with the default LeRobot policy stack, Evo1 usually needs these extras:
- `flash-attn`
- InternVL3 model weights
- `transformers` support for the InternVL3 remote code path
The most important compatibility constraint is:
- `flash-attn` must match your `torch` version, CUDA version, Python version, and wheel ABI.
## Known Working Combinations
Validated in this repo / recent experiments:
- Evo-RL A800 environment:
- `torch==2.4.1+cu118`
- `flash_attn==2.6.3`
- Original Evo1-style environment discussed during reproduction:
- `python==3.10`
- `torch==2.5.1`
- `torchvision==0.20.1`
- `transformers==4.39.0`
- `flash-attn==2.8.3`
## Training Notes
- `training_stage=stage1` freezes the VLM and trains the action head.
- `training_stage=stage2` finetunes both the VLM and the action head.
- In this repo, `resume_pretrain=true` is the Evo1-style stage handoff: load weights only, but start a fresh optimizer/scheduler state.
- We currently recommend `dataset.image_transforms.enable=false` in the validated training commands because the image augmentation pipeline was not stable in the tested environment.
## Stage 1 Command
Example: 4 GPUs, effective batch size `16` (`4 x 4`), `5000` steps, save every `2500`.
```bash
cd /root/private_data/code/Evo-RL
PYTHONPATH=src /opt/conda/bin/accelerate launch \
--config_file src/lerobot/policies/evo1/accelerate_four_gpu_bf16.yaml \
-m lerobot.scripts.lerobot_train \
--dataset.repo_id=Elvinky/bi_so101_fold_towel_d0 \
--dataset.root=/root/private_data/data/bi_so101_fold_towel_d0 \
--dataset.image_transforms.enable=false \
--policy.type=evo1 \
--policy.training_stage=stage1 \
--policy.vlm_model_name=/root/private_data/models/InternVL3-1B \
--policy.device=cuda \
--policy.push_to_hub=false \
--policy.dropout=0.2 \
--policy.optimizer_lr=1e-5 \
--policy.optimizer_weight_decay=1e-3 \
--policy.optimizer_grad_clip_norm=1.0 \
--policy.scheduler_warmup_steps=1000 \
--policy.num_layers=8 \
--policy.chunk_size=50 \
--policy.n_action_steps=50 \
--policy.max_action_dim=24 \
--policy.max_state_dim=24 \
--batch_size=4 \
--num_workers=4 \
--steps=5000 \
--log_freq=10 \
--save_checkpoint=true \
--save_freq=2500 \
--eval_freq=0 \
--wandb.enable=false \
--output_dir=/root/private_data/code/Evo-RL/outputs/train/evo1_stage1
```
## Stage 2 Command
Example: start stage2 from the stage1 `5000`-step checkpoint, `80000` steps, save every `10000`.
```bash
cd /root/private_data/code/Evo-RL
PYTHONPATH=src /opt/conda/bin/accelerate launch \
--config_file src/lerobot/policies/evo1/accelerate_four_gpu_bf16.yaml \
-m lerobot.scripts.lerobot_train \
--dataset.repo_id=Elvinky/bi_so101_fold_towel_d0 \
--dataset.root=/root/private_data/data/bi_so101_fold_towel_d0 \
--dataset.image_transforms.enable=false \
--policy.path=/root/private_data/code/Evo-RL/outputs/train/evo1_stage1/checkpoints/005000/pretrained_model \
--policy.training_stage=stage2 \
--resume_pretrain=true \
--policy.vlm_model_name=/root/private_data/models/InternVL3-1B \
--policy.device=cuda \
--policy.push_to_hub=false \
--policy.dropout=0.2 \
--policy.optimizer_lr=1e-5 \
--policy.optimizer_weight_decay=1e-3 \
--policy.optimizer_grad_clip_norm=1.0 \
--policy.scheduler_warmup_steps=1000 \
--policy.num_layers=8 \
--policy.chunk_size=50 \
--policy.n_action_steps=50 \
--policy.max_action_dim=24 \
--policy.max_state_dim=24 \
--batch_size=4 \
--num_workers=4 \
--steps=80000 \
--log_freq=10 \
--save_checkpoint=true \
--save_freq=10000 \
--eval_freq=0 \
--wandb.enable=false \
--output_dir=/root/private_data/code/Evo-RL/outputs/train/evo1_stage2
```

查看文件

@ -1,16 +0,0 @@
compute_environment: LOCAL_MACHINE
debug: false
distributed_type: "NO"
downcast_bf16: "no"
enable_cpu_affinity: false
machine_rank: 0
main_training_function: main
mixed_precision: bf16
num_machines: 1
num_processes: 1
rdzv_backend: static
same_network: true
tpu_env: []
tpu_use_cluster: false
tpu_use_sudo: false
use_cpu: false