cli.train
cli.train
CLI to run training on a model.
Functions
| Name | Description |
|---|---|
| do_cli | Parses axolotl config, CLI args, and calls do_train. |
| do_train | Trains a transformers model by first loading the dataset(s) specified in the |
| ray_train_func | Ray Train entrypoint executed on each GPU worker. |
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 axolotl config 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 axolotl config keys to values. |
required |
| cli_args | TrainerCliArgs | Training-specific CLI arguments. | required |
ray_train_func
cli.train.ray_train_func(kwargs)Ray Train entrypoint executed on each GPU worker.
Re-validates the config against worker-local GPU capabilities (deferred from the driver), then runs the standard training pipeline.