Skip to main content

Global Options

These options work across most AITraining CLI commands.

Version

Check the installed version:
aitraining --version
aitraining -v

Help

Get help for any command:
aitraining --help
aitraining llm --help
aitraining text-classification --help

Config File

Load parameters from a YAML configuration file:
aitraining --config path/to/config.yaml
This is useful for:
  • Reproducible experiments
  • Complex configurations
  • Sharing settings with teammates

Backend

Specify where training runs:
aitraining llm --train --backend local ...
Available backends:
BackendDescription
localRun on local machine (default). Variants: local-cli, local-ui
spaces-*Run on Hugging Face Spaces
ep-*Hugging Face Endpoints
ngc-*NVIDIA NGC/DGX Cloud
nvcf-*NVIDIA Cloud Functions

Spaces Backend Options

BackendGPU
spaces-t4-smallT4 (small)
spaces-t4-mediumT4 (medium)
spaces-a10g-smallA10G (small)
spaces-a10g-largeA10G (large)
spaces-a10g-largex22x A10G
spaces-a10g-largex44x A10G
spaces-a100-largeA100
spaces-l4x11x L4
spaces-l4x44x L4
spaces-l40sx11x L40S
spaces-l40sx44x L40S
spaces-l40sx88x L40S
spaces-cpu-basicCPU only
spaces-cpu-upgradeCPU (upgraded)
Remote backends require authentication: When using non-local backends (spaces-*, ep-*, ngc-*, nvcf-*), you must provide --username and --token for Hugging Face authentication.
Push to Hub also requires authentication: Even with --backend local, using --push-to-hub requires --username and --token to upload the model to Hugging Face Hub.

Environment Variables

Set these before running commands:

Authentication

export HF_TOKEN="hf_..."        # Hugging Face token
export WANDB_API_KEY="..."       # Weights & Biases key

GPU Configuration

export CUDA_VISIBLE_DEVICES=0,1  # Use specific GPUs
export PYTORCH_CUDA_ALLOC_CONF=max_split_size_mb:512  # Memory management

MPS (Apple Silicon) Control

export AUTOTRAIN_DISABLE_MPS=1  # Force CPU training on Mac
export AUTOTRAIN_ENABLE_MPS=1   # Force MPS even with quantization

Interactive Mode

Launch the configuration wizard:
aitraining           # No arguments = wizard mode
aitraining llm --interactive  # Explicit interactive mode

Next Steps