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