File size: 1,198 Bytes
99e41a8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env bash
# Phase 4: fine-tune GR00T N1.7 on an SO-101 dataset (LeRobot v3 format), blog recipe.
# Usage: scripts/train_groot_so101.sh <hf_user/dataset> <hf_user/output_model> [steps=20000]
# Needs 40 GB+ VRAM for these settings (H100/L40/A100-80G). Multi-GPU: set NGPU>1.
set -euo pipefail
DATASET=${1:?dataset repo id}; OUT=${2:?output repo id}; STEPS=${3:-20000}; NGPU=${NGPU:-1}
cd third_party/lerobot
if [ "$NGPU" -gt 1 ]; then
  LAUNCH=(uv run accelerate launch --multi_gpu --num_processes="$NGPU" "$(uv run which lerobot-train)")
else
  LAUNCH=(uv run lerobot-train)
fi
"${LAUNCH[@]}" \
  --dataset.repo_id="$DATASET" \
  --dataset.image_transforms.enable=true \
  --policy.type=groot \
  --policy.base_model_path=nvidia/GR00T-N1.7-3B \
  --policy.embodiment_tag=new_embodiment \
  --policy.chunk_size=16 --policy.n_action_steps=16 \
  --policy.use_relative_actions=true \
  --policy.relative_exclude_joints='["gripper"]' \
  --policy.use_bf16=true \
  --policy.repo_id="$OUT" \
  --use_policy_training_preset=true \
  --batch_size=64 --steps="$STEPS" --save_freq=5000 --seed=42 \
  --wandb.enable="${WANDB_ENABLE:-false}" \
  --output_dir="../../outputs/train/$(basename "$OUT")"