Axolotlは、様々なAIモデルの事後学習プロセスを簡素化するために特別に設計されたオープンソースツールです。事後学習とは、事前学習済みモデルに対して行われるあらゆる修正または追加の学習を指し、全モデルのファインチューニング、パラメータ効率の良いチューニング(LoRAやQLoRAなど)、教師ありファインチューニング(SFT)、指示チューニング、アライメント技術などが含まれます。このツールは、多様なモデルアーキテクチャと学習構成をサポートしており、ユーザーはこれらの高度な学習技術を簡単に使い始めることができます。
pip3 install -U packaging==23.2 setuptools==75.8.0 wheel ninja
pip3 install --no-build-isolation axolotl[flash-attn,deepspeed]
# サンプル設定ファイルのダウンロード
axolotl fetch examples
axolotl fetch deepspeed_configs # オプション
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
サンプル設定の取得:
axolotl fetch examples
モデルの学習:
axolotl train examples/llama-3/lora-1b.yml
カスタム設定: 必要に応じてYAML設定ファイルのパラメータを修正
AxolotlはYAML設定ファイルを使用して、モデルの選択とパラメータ、データセットの設定と事前処理、学習ハイパーパラメータ、オプティマイザ設定、監視とログ記録など、学習プロセス全体を制御します。
モデル | fp16/fp32 | LoRA | QLoRA | GPTQ | Flash Attn | xformers |
---|---|---|---|---|---|---|
LLaMA | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Mistral | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Mixtral-MoE | ✅ | ✅ | ✅ | ❓ | ❓ | ❓ |
Pythia | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ |
Falcon | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ |
Qwen | ✅ | ✅ | ✅ | ❓ | ❓ | ❓ |
Gemma | ✅ | ✅ | ✅ | ❓ | ❓ | ✅ |
✅: サポート ❌: サポートしない ❓: 未テスト