axolotl

Par mkurman · zorai

Framework de fine-tuning simplifié pour les LLM. Prend en charge le fine-tuning complet, LoRA, QLoRA, FSDP, DeepSpeed et le multi-GPU. Piloté par configuration YAML. Compatible avec Llama, Mistral, Qwen, DeepSeek et des centaines de modèles HF.

npx skills add https://github.com/mkurman/zorai --skill axolotl

Overview

Axolotl est un framework de fine-tuning supportant SFT, QLoRA, LoRA, fine-tuning complet, DPO et tuning multimodal pour 100+ modèles (Llama, Mistral, Qwen, Gemma, DeepSeek). La configuration YAML évite le boilerplate. Supporte multi-GPU, FSDP, DeepSpeed et flash attention.

Installation

git clone https://github.com/OpenAccess-AI-Collective/axolotl
cd axolotl
uv pip install -e .

Basic Config

# config.yml
base_model: Qwen/Qwen2.5-1.5B-Instruct
model_type: AutoModelForCausalLM
tokenizer_type: AutoTokenizer
output_dir: ./output

# LoRA
adapter: lora
lora_r: 16
lora_alpha: 32
lora_dropout: 0.05
lora_target_modules:
  - q_proj
  - v_proj

# Training
sequence_len: 2048
micro_batch_size: 2
gradient_accumulation_steps: 4
num_epochs: 3
learning_rate: 2e-5
optimizer: adamw_bnb_8bit

Run

accelerate launch -m axolotl.cli.train config.yml

Inference

python -m axolotl.cli.inference --lora_model_dir ./output --base_model Qwen/Qwen2.5-1.5B-Instruct

References

Skills similaires