Axolotl is an open-source tool specifically designed to simplify various AI model post-training processes. Post-training refers to any modifications or additional training performed on a pre-trained model, including full model fine-tuning, parameter-efficient tuning (such as LoRA and QLoRA), supervised fine-tuning (SFT), instruction tuning, and alignment techniques. This tool supports a wide range of model architectures and training configurations, making it easy for users to get started with these advanced training techniques.
pip3 install -U packaging==23.2 setuptools==75.8.0 wheel ninja
pip3 install --no-build-isolation axolotl[flash-attn,deepspeed]
# Download example configuration files
axolotl fetch examples
axolotl fetch deepspeed_configs # Optional
git clone https://github.com/axolotl-ai-cloud/axolotl.git
cd axolotl
pip3 install -U packaging setuptools wheel ninja
pip3 install --no-build-isolation -e '.[flash-attn,deepspeed]'
docker run --gpus '"all"' --rm -it axolotlai/axolotl:main-latest
Fetch Example Configuration:
axolotl fetch examples
Train Model:
axolotl train examples/llama-3/lora-1b.yml
Customize Configuration: Modify parameters in the YAML configuration file as needed.
Axolotl uses YAML configuration files to control the entire training process, including:
Model | fp16/fp32 | LoRA | QLoRA | GPTQ | Flash Attn | xformers |
---|---|---|---|---|---|---|
LLaMA | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Mistral | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Mixtral-MoE | ✅ | ✅ | ✅ | ❓ | ❓ | ❓ |
Pythia | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ |
Falcon | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ |
Qwen | ✅ | ✅ | ✅ | ❓ | ❓ | ❓ |
Gemma | ✅ | ✅ | ✅ | ❓ | ❓ | ✅ |
✅: Supported ❌: Not Supported ❓: Untested