axolotl

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

Updated Aug 22, 2026
One-click install
npx skills add https://github.com/vivekgoquest/hermes-agent-stable --skill axolotl-vivekgoquest
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: axolotl
Source: https://github.com/vivekgoquest/hermes-agent-stable/tree/main/optional-skills/mlops/training/axolotl
Command: npx skills add https://github.com/vivekgoquest/hermes-agent-stable --skill axolotl-vivekgoquest

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 juggling complex training configurations, dataset formats, distributed training setups, and RLHF methods. This Skill provides expert guidance for Axolotl, the YAML-driven fine-tuning framework, so you can configure LoRA/QLoRA, DPO, KTO, ORPO, and GRPO training runs without digging through source code. ## Core Features & Use Cases - YAML Training Configuration: Guidance on FSDP, DeepSpeed, context parallelism, mixed precision (FP16/BF16/FP8), and sample packing for single-GPU to multi-node training. - Dataset Format Support: Covers pre-training, instruction (Alpaca), conversation (chat_template/ChatML), template-free input_output, and preference dataset formats with masking control. - RLHF & Advanced Methods: Documents DPO, IPO, ORPO, KTO, GRPO with vLLM acceleration, reward modeling, and process reward models. - Use Case: You want to fine-tune a Llama model on a custom chat dataset with QLoRA on 4 GPUs. This Skill helps you write the correct YAML config, choose the chat_template, set roles_to_train masking, and launch training. ## Quick Start Ask the agent to help you write an Axolotl YAML config to fine-tune your chosen base model on your dataset with LoRA.

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 CLI command. Axolotl handles tokenization, dataset preprocessing, and training via HuggingFace transformers.

What dataset formats does Axolotl support for fine-tuning?▼

Axolotl supports pre-training text, instruction formats like Alpaca, conversation formats using chat_template with OpenAI or ShareGPT messages, template-free input_output with segment masking, and pre-tokenized datasets. Preference methods like DPO use chosen/rejected pair formats.

Does Axolotl support multi-GPU and distributed training?▼

Yes, Axolotl supports FSDP version 2, DeepSpeed, and context parallelism for multi-GPU training. Configure fsdp_config with transformer_layer_cls_to_wrap and set context_parallel_size as a divisor of your total GPU count.

How do I train with DPO or GRPO in Axolotl?▼

Set rl: dpo in your YAML and use supported dataset types like chatml.intel or chatml.ultra with chosen/rejected pairs. For GRPO, install axolotl[vllm], launch a vLLM server on the last N GPUs, and provide custom reward functions.

Why does Axolotl fail with chat_template masking errors?▼

Errors like 'Could not find content boundary' usually mean the eos_token does not match your chat_template's turn delimiter. Set the correct eos_token under special_tokens and verify message_property_mappings match your dataset's role and content keys.

Can Axolotl fine-tune vision-language or multimodal models?▼

Yes, Axolotl has beta multimodal support for Mllama, Llama4, Pixtral, Llava-1.5, and Mistral-Small architectures using an extended chat_template format with image, audio, or video content keys. Sample packing is not yet supported for multimodal training.