Skip to content

Commit

Permalink
Adding brief README documentation for CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Saunders committed Dec 3, 2024
1 parent 7a9e022 commit fcd5106
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,46 @@ accelerate launch -m axolotl.cli.inference examples/openllama-3b/lora.yml \
accelerate launch -m axolotl.cli.train https://raw.githubusercontent.com/axolotl-ai-cloud/axolotl/main/examples/openllama-3b/lora.yml
```

### Axolotl CLI (New)

If you've installed this package using `pip` from source, we now support a new, more
streamlined CLI using [click](https://click.palletsprojects.com/en/stable/). Rewriting
the above commands:

```bash
# preprocess datasets - optional but recommended
CUDA_VISIBLE_DEVICES="" axolotl preprocess examples/openllama-3b/lora.yml

# finetune lora
axolotl train examples/openllama-3b/lora.yml

# inference
axolotl inference examples/openllama-3b/lora.yml \
--lora_model_dir="./outputs/lora-out"

# gradio
axolotl inference examples/openllama-3b/lora.yml \
--lora_model_dir="./outputs/lora-out" --gradio

# remote yaml files - the yaml config can be hosted on a public URL
# Note: the yaml config must directly link to the **raw** yaml
axolotl train https://raw.githubusercontent.com/axolotl-ai-cloud/axolotl/main/examples/openllama-3b/lora.yml
```

We've also added a new command for fetching `examples` and `deepspeed_configs` to your
local machine. This will come in handy when installing `axolotl` from PyPI.

```bash
# Fetch example YAML files (stores in "examples/" folder)
axolotl fetch examples

# Fetch deepspeed config files (stores in "deepspeed_configs/" folder)
axolotl fetch deepspeed_configs

# Optionally, specify a destination folder
axolotl fetch examples --dest path/to/folder
```

## Advanced Setup

### Environment
Expand Down

0 comments on commit fcd5106

Please sign in to comment.