cli.train
cli.train
CLI to run training on a model.
Functions
| Name | Description | 
|---|---|
| do_cli | Parses axolotlconfig, CLI args, and callsdo_train. | 
| do_train | Trains a transformersmodel by first loading the dataset(s) specified in the | 
do_cli
cli.train.do_cli(config=Path('examples/'), **kwargs)Parses axolotl config, CLI args, and calls do_train.
Parameters
| Name | Type | Description | Default | 
|---|---|---|---|
| config | Union[Path, str] | Path to axolotlconfig YAML file. | Path('examples/') | 
| kwargs | Additional keyword arguments to override config file values. | {} | 
do_train
cli.train.do_train(cfg, cli_args)Trains a transformers model by first loading the dataset(s) specified in the
axolotl config, and then calling axolotl.train.train. Also runs the plugin
manager’s post_train_unload once training completes.
Parameters
| Name | Type | Description | Default | 
|---|---|---|---|
| cfg | DictDefault | Dictionary mapping axolotlconfig keys to values. | required | 
| cli_args | TrainerCliArgs | Training-specific CLI arguments. | required |