axolotl

Configure and run YAML-driven LLM fine-tuning with LoRA, DPO, and GRPO.

Updated Jun 5, 2026
One-click install
npx skills add https://github.com/xu1713/openhorse --skill axolotl-xu1713
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: axolotl
Source: https://github.com/xu1713/openhorse/tree/main/openhorse/openhorse/optional-skills/mlops/training/axolotl
Command: npx skills add https://github.com/xu1713/openhorse --skill axolotl-xu1713

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires axolotl, torch, transformers, datasets, peft, accelerate, deepspeed, and includes references (resource) components.

What problem does it solve? Fine-tuning large language models requires coordinating tokenizers, dataset formats, distributed training, and RLHF methods, which is error-prone when done by hand. This Skill provides expert guidance for Axolotl, a framework that reduces the entire workflow to a single YAML configuration file. ## Core Features & Use Cases - YAML-Based Fine-Tuning: Configure LoRA, QLoRA, full fine-tuning, and pre-training for 100+ HuggingFace models through declarative configs. - Preference & RL Training: Set up DPO, KTO, ORPO, GRPO, reward modeling, and process reward models with supported dataset formats. - Distributed & Optimized Training: Apply FSDP, DeepSpeed, context parallelism, mixed precision (BF16/FP8), and LoRA kernel optimizations for multi-GPU jobs. - Use Case: Fine-tune Llama 3 on a custom chat dataset by writing a YAML config with a chat_template, pointing to a JSONL dataset, and running the axolotl train command on multiple GPUs. ## Quick Start Ask the assistant to write an Axolotl YAML config that fine-tunes a Llama model with QLoRA on your instruction dataset and explain each setting.

Frequently Asked Questions about axolotl

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fine-tune an LLM with Axolotl?

Write a YAML config specifying base_model, datasets with their type, and adapter settings like lora, then run the axolotl train command. Axolotl handles tokenization, dataset preprocessing, and training loop setup automatically.

What dataset formats does Axolotl support?

Axolotl supports pre-training text, pre-tokenized data, template-free input_output segments, conversation formats with chat_templates, and instruction formats like Alpaca. Preference methods such as DPO, KTO, and ORPO each have their own dataset types.

Does Axolotl support multi-GPU and distributed training?

Yes, Axolotl supports FSDP, DeepSpeed, and context parallelism for multi-GPU training. You configure fsdp_config or deepspeed in the YAML, and context_parallel_size must divide the total GPU count.

Can Axolotl train with DPO or GRPO reinforcement learning?

Yes, Axolotl wraps TRL to support DPO, IPO, ORPO, KTO, GRPO, and reward modeling. GRPO integrates with vLLM for faster trajectory generation, using separate GPUs for the vLLM server and training.

Why does Axolotl training fail with a padding token error?

This happens when the tokenizer lacks a pad token. Add a pad_token under special_tokens in your YAML config, typically setting it to the same value as the eos_token.

Does Axolotl support multimodal or vision language models?

Yes, Axolotl has beta support for models like Llama 3.2 Vision, Llama 4, Pixtral, and Gemma 3 using an extended chat_template format. Sample packing is not yet supported for multimodal training.