INNER CODE UNIT · Python
parse_args
Guitaricet/relora · torchrun_main.py:54
def parse_args(args=None):
parser = argparse.ArgumentParser()
parser.add_argument("--training_config", type=str, default=None,
help="Alternative to providing the parameters. Overrides all parameters. Path to a yaml file with training run config")
parser.add_argument("--model_config", type=str, default=None)
parser.add_argument("--model_name_or_path", type=str, default=None, help="Huggingface model identifier, alternative to --model_config")
parser.add_argument("--model_revision", type=str, default=None, help="Tag name, branch name, or commit hash of the model from HuggingFace Hub. E.g., v2.0.1 or step1000")
parser.add_argument("--warmed_up_model", type=str, default=None, help="Start with warmed-up model weights. Does not restore optimizer and scheduler.")
parser.add_argument("--resume_from", type=str, default=None, help="Continue training with ReLoRA, loading optimizer and scheduler from the checkpoint.")
parser.add_argument("--load_optimizer_state_on_resume", default=True, type=lambda x: x.lower() == "true",
help="Load optimizer state from the checkpoint when resuming training. "
"If False, optimizer state will be initialized from scratch. Setting it to False is useful for some very specific experiments.")
parser.add_argument("--dataset_path", type=str, default=None, help="Path to a huggingface dataset directory")
parser.add_argument("--megatron_dataset_config", type=str, default=None,
help="Path to a megatron dataset config file. Only one of --dataset_path and --megatron_dataset_config should be provided.")