A Free and Open Source LLM Fine-tuning Framework
🎉 Latest Updates
- 2026/10:
context_parallel_size, and fix expert-LoRA resume and FSDP2 activation checkpointing with LoRA.
- 2026/09:
axolotl export, with optional quantization for deployment with llama.cpp and Ollama.
- NVFP4 LoRA now supports native TorchAO dense weights and merge-aware training, optimizing against the quantized merged weights for deployment.
- New training options: MixLoRA adds routed LoRA experts to dense models, and Dynamic Fine-Tuning (DFT) weights the SFT loss by token probability.
- Ringmaster context parallelism adds Ulysses and combined Ulysses/Ring (USP) support, sample packing, and CP fixes for GDN, KDA, and Mamba/Mamba2 models.
- Torch all-to-all Expert Parallelism enables MoE training over NVLink or PCIe without requiring DeepEP. Expanded N-D parallelism supports EP with FSDP2, HSDP, and context parallelism, plus FSDP2 + tensor parallelism.
- Selective activation checkpointing adds rules to save specific projections or large matrix multiplications, with optional CPU offload to tune the memory/recomputation tradeoff.
- Improved plugin integration includes new cloud provider interfaces for launching training jobs, with support for Nebius Serverless Jobs.
- 2026/08:
- 2026/07:
- 2026/06:
- 2026/04:
- 2026/03:
quantize_moe_experts: true) greatly reduces VRAM when training MoE models (FSDP2 compat).
- 2026/02:
- 2026/01:
- 2025/12:
- 2025/10: New model support has been added in Axolotl for: Qwen3 Next, Qwen2.5-vl, Qwen3-vl, Qwen3, Qwen3MoE, Granite 4, HunYuan, Magistral 2509, Apertus, and Seed-OSS.
- 2025/09: Axolotl now has text diffusion training. Read more here.
- 2025/08: QAT has been updated to include NVFP4 support. See PR.
- 2025/07:
torchao. Get started here!
- Voxtral, Magistral 1.1, and Devstral with mistral-common tokenizer support has been integrated in Axolotl!
- TiledMLP support for single-GPU to multi-GPU training with DDP, DeepSpeed and FSDP support has been added to support Arctic Long Sequence Training. (ALST). See examples for using ALST with Axolotl!
- 2025/06: Magistral with mistral-common tokenizer support has been added to Axolotl. See docs to start training your own Magistral models with Axolotl!
- 2025/05: Quantization Aware Training (QAT) support has been added to Axolotl. Explore the docs to learn more!
- 2025/04: Llama 4 support has been added in Axolotl. See docs to start training your own Llama 4 models with Axolotl's linearized version!
- 2025/03: Axolotl has implemented Sequence Parallelism (SP) support. Read the blog and docs to learn how to scale your context length when fine-tuning.
- 2025/03: (Beta) Fine-tuning Multimodal models is now supported in Axolotl. Check out the docs to fine-tune your own!
- 2025/02: Axolotl has added LoRA optimizations to reduce memory usage and improve training speed for LoRA and QLoRA in single GPU and multi-GPU training (DDP and DeepSpeed). Jump into the docs to give it a try.
- 2025/02: Axolotl has added GRPO support. Dive into our blog and GRPO example and have some fun!
- 2025/01: Axolotl has added Reward Modelling / Process Reward Modelling fine-tuning support. See docs.
✨ Overview
Axolotl is a free and open-source tool designed to streamline post-training and fine-tuning for the latest large language models (LLMs).
Features:
- Multiple Model Support: Train various models like GPT-OSS, LLaMA, Mistral, Mixtral, Pythia, and many more models available on the Hugging Face Hub.
- Multimodal Training: Fine-tune vision-language models (VLMs) including LLaMA-Vision, Qwen2-VL, Pixtral, LLaVA, SmolVLM2, GLM-4.6V, InternVL 3.5, Gemma 3n, PaddleOCR-VL, Muse Glimmer, and audio models like Voxtral with image, video, and audio support.
- Training Methods: Full fine-tuning, LoRA, QLoRA, GPTQ, QAT (int8/int4/FP8/NVFP4/MXFP4), FP8 mixed-precision training, NVFP4/MXFP4 MoE LoRA, Preference Tuning (DPO, IPO, KTO, ORPO), RL (GRPO, GDPO), and Reward Modelling (RM) / Process Reward Modelling (PRM).
- Easy Configuration: Re-use a single YAML configuration file across the full fine-tuning pipeline: dataset preprocessing, training, evaluation, quantization, and inference.
- Performance Optimizations: Multipacking, Flash Attention 2/3/4, Xformers, Flex Attention, SageAttention, Liger Kernel, Cut Cross Entropy, ScatterMoE, Sequence Parallelism (SP), LoRA optimizations, Multi-GPU training (FSDP2, DeepSpeed), Multi-node training (Torchrun, Ray), and many more!
- Flexible Dataset Handling: Load from local, HuggingFace, and cloud (S3, Azure, GCP, OCI) datasets.
- Cloud Ready: We ship Docker images and also PyPI packages for use on cloud platforms and local hardware.
🚀 Quick Start - LLM Fine-tuning in Minutes
Requirements:
- NVIDIA GPU (Ampere or newer for
bf16and Flash Attention) or AMD GPU - Python >=3.12 (3.12 recommended)
- PyTorch ≥2.13.0 (2.13.0 recommended)
Google Colab
Installation
# install uv if you don't already have it installed (restart shell after)
curl -LsSf https://astral.sh/uv/install.sh | sh
change depending on system
export UV_TORCH_BACKEND=cu130
create a new virtual environment
uv venv --python 3.12
source .venv/bin/activate
uv pip install torch==2.14.0 torchvision
uv pip install axolotl[deepspeed]
Download example axolotl configs, deepspeed configs
axolotl fetch examples
axolotl fetch deepspeed_configs # OPTIONAL
Using Docker
Installing with Docker can be less error prone than installing in your own environment.
docker run --gpus '"all"' --ipc=host --rm -it axolotlai/axolotl:main-latest
Other installation approaches are described here.
Cloud Providers
Your First Fine-tune
# Fetch axolotl examples
axolotl fetch examples
Or, specify a custom path
axolotl fetch examples --dest path/to/folder
Train a model using LoRA
axolotl train examples/llama-3/lora-1b.yml
That's it! Check out our Getting Started Guide for a more detailed walkthrough.
📚 Documentation
- Installation Options - Detailed setup instructions for different environments
- Support Matrix - Feature support, compatibility, and known gaps
- Configuration Guide - Full configuration options and examples
- Dataset Loading - Loading datasets from various sources
- Dataset Guide - Supported formats and how to use them
- Multi-GPU Training
- Multi-Node Training
- Multipacking
- API Reference - Auto-generated code documentation
- FAQ - Frequently asked questions
AI Agent Support
Axolotl ships with built-in documentation optimized for AI coding agents (Claude Code, Cursor, Copilot, etc.). These docs are bundled with the pip package, no repo clone needed.
# Show overview and available training methods
axolotl agent-docs
Topic-specific references
axolotl agent-docs sft # supervised fine-tuning
axolotl agent-docs grpo # GRPO online RL
axolotl agent-docs preference_tuning # DPO, KTO, ORPO, SimPO
axolotl agent-docs reward_modelling # outcome and process reward models
axolotl agent-docs pretraining # continual pretraining
axolotl agent-docs --list # list all topics
Dump config schema for programmatic use
axolotl config-schema
axolotl config-schema --field adapter
If you're working with the source repo, agent docs are also available at docs/agents/ and the project overview is in AGENTS.md.
🤝 Getting Help
- Join our Discord community for support
- Check out our Examples directory
- Read our Debugging Guide
- Need dedicated support? Please contact ✉️[email protected] for options
🌟 Contributing
Contributions are welcome! Please see our Contributing Guide for details.
📈 Telemetry
Axolotl has opt-out telemetry that helps us understand how the project is being used and prioritize improvements. We collect basic system information, model types, and error rates, never personal data or file paths. Telemetry is enabled by default. To disable it, set AXOLOTL_DO_NOT_TRACK=1. For more details, see our telemetry documentation.
❤️ Sponsors
Interested in sponsoring? Contact us at [email protected]
📝 Citing Axolotl
If you use Axolotl in your research or projects, please cite it as follows:
@software{axolotl,
title = {Axolotl: Open Source LLM Post-Training},
author = {{Axolotl maintainers and contributors}},
url = {https://github.com/axolotl-ai-cloud/axolotl},
license = {Apache-2.0},
year = {2023}
}
📜 License
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.