TrainingConfig
TheTrainingConfig class defines parameters for training Vision-Language-Action models.
Output configuration
str
default:"./outputs"
Directory where model checkpoints, logs, and outputs are saved.
str | None
default:"None"
Optional name for the experiment. Used for organizing outputs and tracking.
Basic training parameters
int
default:"30000"
Total number of training steps to run. This overrides
num_epochs.int
default:"1024"
Total effective batch size across all GPUs and accumulation steps.
int | None
default:"None"
Per-device batch size. If
None, calculated from global_batch_size.int
default:"1"
Number of forward passes to accumulate before performing a backward/update step.
Optimization parameters
float
default:"1e-4"
Initial learning rate for the optimizer.
str
default:"cosine"
Learning rate scheduler type (e.g.,
cosine, linear, constant).float
default:"1e-5"
Weight decay coefficient for optimizer (L2 regularization).
float
default:"0.05"
Proportion of total training steps used for learning rate warm-up.
int
default:"0"
Number of warm-up steps. Overrides
warmup_ratio if set.float
default:"1.0"
Maximum gradient norm for gradient clipping.
str
default:"adamw_torch_fused"
Optimizer choice. Options include:
adamw_torch: Standard AdamW from PyTorchadamw_torch_fused: Fused AdamW (faster)paged_adamw_32bit: Paged AdamW 32-bit (requires bitsandbytes)paged_adamw_8bit: Paged AdamW 8-bit (requires bitsandbytes)adafactor: Adafactor optimizer
str | None
default:"None"
Path to a checkpoint to resume training from.
Mixed precision training
bool
default:"True"
Enable TF32 mode for NVIDIA Ampere GPUs and later.
bool
default:"False"
Enable FP16 mixed precision training.
bool
default:"True"
Enable BF16 mixed precision training.
bool
default:"True"
Use BF16 for evaluation.
Logging and checkpointing
int
default:"10"
Frequency (in training steps) at which to log training metrics.
int
default:"1000"
Frequency (in training steps) at which to save checkpoints.
int
default:"5"
Maximum number of checkpoints to keep before older ones are deleted.
bool
default:"False"
Control whether to save VL model and processor in callbacks.
Checkpoint uploading
bool
default:"False"
Enable automatic checkpoint uploading.
int
default:"1000"
Upload checkpoints every N steps.
int
default:"5"
Number of most recent checkpoints to keep uploaded.
int
default:"2"
Maximum number of concurrent checkpoint uploads.
Evaluation parameters
str
default:"no"
Evaluation strategy:
no, steps, or epoch.int
default:"500"
Frequency (in steps) at which to run evaluation.
float
default:"0.1"
Ratio of data to use for evaluation split.
int
default:"2"
Batch size for evaluation.
str
default:""
Name of the metric to use for saving best checkpoints.
bool
default:"True"
Whether higher values of the eval metric are better.
DeepSpeed configuration
int
default:"2"
ZeRO optimization stage (1, 2, or 3).
bool
default:"False"
Enable gradient checkpointing to reduce memory usage.
Transformers loading parameters
bool
default:"True"
Trust remote code when loading models from Hugging Face Hub.
bool
default:"False"
Only use local files (no downloads from Hugging Face Hub).
str | None
default:"None"
Directory for caching Hugging Face models.
str | None
default:"None"
Access token for Hugging Face Hub (for private models).
DDP configuration
bool
default:"False"
Use DistributedDataParallel instead of DeepSpeed.
int
default:"100"
DDP bucket capacity in MB for gradient communication.
Hardware configuration
int
default:"1"
Number of GPUs to use for training.
int
default:"2"
Number of parallel worker processes for data loading.
Data handling
bool
default:"False"
Whether to remove unused columns from the dataset.
Experiment tracking
bool
default:"False"
Enable Weights & Biases (wandb) logging.
str
default:"finetune-gr00t-n1d6"
Wandb project name for tracking experiments.
Performance profiling
bool
default:"False"
Enable PyTorch profiler for performance analysis.
Fault tolerance
int
default:"3"
Maximum number of retries in training for fault tolerance.
Testing
float | None
default:"None"
For testing: assert that loss is less than this value.
Reinforcement learning
bool
default:"False"
Add reinforcement learning callback during training.
Open-loop evaluation
bool
default:"False"
Enable open-loop evaluation on saved checkpoints.
list[int]
default:"[0]"
List of trajectory IDs to evaluate.
int
default:"100"
Number of steps to evaluate per trajectory.
list[int] | None
default:"None"
List of action indices to plot. If
None, plots all indices.FinetuneConfig
TheFinetuneConfig class is a simplified configuration specifically designed for single-node fine-tuning. See launch_finetune.py for detailed parameter descriptions.
Key differences from TrainingConfig
- Focused on single-node training scenarios
- Includes embodiment-specific parameters
- Provides granular control over which model components to tune
- Includes data augmentation parameters
- Simplified parameter set compared to full
TrainingConfig