cli.main
cli.main
Click CLI definitions for various axolotl commands.
Functions
Name | Description |
---|---|
cli | Axolotl CLI - Train and fine-tune large language models |
evaluate | Evaluate a model. |
fetch | Fetch example configs or other resources. |
inference | Run inference with a trained model. |
merge_lora | Merge trained LoRA adapters into a base model. |
merge_sharded_fsdp_weights | Merge sharded FSDP model weights. |
preprocess | Preprocess datasets before training. |
train | Train or fine-tune a model. |
cli
cli.main.cli()
Axolotl CLI - Train and fine-tune large language models
evaluate
**kwargs) cli.main.evaluate(config, accelerate,
Evaluate a model.
Parameters
Name | Type | Description | Default |
---|---|---|---|
config | str | Path to axolotl config YAML file. |
required |
accelerate | bool | Whether to use accelerate launcher. |
required |
kwargs | Additional keyword arguments which correspond to CLI args or axolotl config options. |
{} |
fetch
cli.main.fetch(directory, dest)
Fetch example configs or other resources.
Available directories: - examples: Example configuration files - deepspeed_configs: DeepSpeed configuration files
Parameters
Name | Type | Description | Default |
---|---|---|---|
directory | str | One of examples , deepspeed_configs . |
required |
dest | Optional[str] | Optional destination directory. | required |
inference
**kwargs) cli.main.inference(config, accelerate, gradio,
Run inference with a trained model.
Parameters
Name | Type | Description | Default |
---|---|---|---|
config | str | Path to axolotl config YAML file. |
required |
accelerate | bool | Whether to use accelerate launcher. |
required |
gradio | bool | Whether to use Gradio browser interface or command line for inference. | required |
kwargs | Additional keyword arguments which correspond to CLI args or axolotl config options. |
{} |
merge_lora
**kwargs) cli.main.merge_lora(config,
Merge trained LoRA adapters into a base model.
Parameters
Name | Type | Description | Default |
---|---|---|---|
config | str | Path to axolotl config YAML file. |
required |
kwargs | Additional keyword arguments which correspond to CLI args or axolotl config options. |
{} |
merge_sharded_fsdp_weights
**kwargs) cli.main.merge_sharded_fsdp_weights(config, accelerate,
Merge sharded FSDP model weights.
Parameters
Name | Type | Description | Default |
---|---|---|---|
config | str | Path to axolotl config YAML file. |
required |
accelerate | bool | Whether to use accelerate launcher. |
required |
kwargs | Additional keyword arguments which correspond to CLI args or axolotl config options. |
{} |
preprocess
=None, **kwargs) cli.main.preprocess(config, cloud
Preprocess datasets before training.
Parameters
Name | Type | Description | Default |
---|---|---|---|
config | str | Path to axolotl config YAML file. |
required |
cloud | Optional[str] | Path to a cloud accelerator configuration file. | None |
kwargs | Additional keyword arguments which correspond to CLI args or axolotl config options. |
{} |
train
=None, sweep=None, **kwargs) cli.main.train(config, accelerate, cloud
Train or fine-tune a model.
Parameters
Name | Type | Description | Default |
---|---|---|---|
config | str | Path to axolotl config YAML file. |
required |
accelerate | bool | Whether to use accelerate launcher. |
required |
cloud | Optional[str] | Path to a cloud accelerator configuration file | None |
sweep | Optional[str] | Path to YAML config for sweeping hyperparameters. | None |
kwargs | Additional keyword arguments which correspond to CLI args or axolotl config options. |
{} |