MCPcopy Index your code
hub / github.com/axolotl-ai-cloud/axolotl

github.com/axolotl-ai-cloud/axolotl @v0.17.0 sqlite

repository ↗ · DeepWiki ↗ · release v0.17.0 ↗
5,882 symbols 24,415 edges 724 files 2,963 documented · 50%
README
    <img alt="Axolotl" src="https://raw.githubusercontent.com/axolotl-ai-cloud/axolotl/887513285d98132142bf5db2a74eb5e0928787f1/image/axolotl_logo_digital_black.svg" width="400" height="104" style="max-width: 100%;">









  <strong>A Free and Open Source LLM Fine-tuning Framework</strong>









<img src="https://img.shields.io/github/license/axolotl-ai-cloud/axolotl.svg?color=blue" alt="GitHub License">
<img src="https://github.com/axolotl-ai-cloud/axolotl/actions/workflows/tests.yml/badge.svg" alt="tests">
<a href="https://codecov.io/gh/axolotl-ai-cloud/axolotl"><img src="https://codecov.io/gh/axolotl-ai-cloud/axolotl/branch/main/graph/badge.svg" alt="codecov"></a>
<a href="https://github.com/axolotl-ai-cloud/axolotl/releases"><img src="https://img.shields.io/github/release/axolotl-ai-cloud/axolotl.svg" alt="Releases"></a>



<a href="https://github.com/axolotl-ai-cloud/axolotl/graphs/contributors"><img src="https://img.shields.io/github/contributors-anon/axolotl-ai-cloud/axolotl?color=yellow&style=flat-square" alt="contributors" style="height: 20px;"></a>
<img src="https://img.shields.io/github/stars/axolotl-ai-cloud/axolotl" alt="GitHub Repo stars">



<a href="https://discord.com/invite/HhrNrHJPRb"><img src="https://img.shields.io/badge/discord-7289da.svg?style=flat-square&logo=discord" alt="discord" style="height: 20px;"></a>
<a href="https://twitter.com/axolotl_ai"><img src="https://img.shields.io/twitter/follow/axolotl_ai?style=social" alt="twitter" style="height: 20px;"></a>
<a href="https://colab.research.google.com/github/axolotl-ai-cloud/axolotl/blob/main/examples/colab-notebooks/colab-axolotl-example.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="google-colab" style="height: 20px;"></a>



<img src="https://github.com/axolotl-ai-cloud/axolotl/actions/workflows/tests-nightly.yml/badge.svg" alt="tests-nightly">
<img src="https://github.com/axolotl-ai-cloud/axolotl/actions/workflows/multi-gpu-e2e.yml/badge.svg" alt="multigpu-semi-weekly tests">

🎉 Latest Updates

Expand older updates

  • 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:
  • ND Parallelism support has been added into Axolotl. Compose Context Parallelism (CP), Tensor Parallelism (TP), and Fully Sharded Data Parallelism (FSDP) within a single node and across multiple nodes. Check out the blog post for more info.
  • Axolotl adds more models: GPT-OSS, Gemma 3n, Liquid Foundation Model 2 (LFM2), and Arcee Foundation Models (AFM).
  • FP8 finetuning with fp8 gather op is now possible in Axolotl via 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:

🚀 Quick Start - LLM Fine-tuning in Minutes

Requirements:

  • NVIDIA GPU (Ampere or newer for bf16 and Flash Attention) or AMD GPU
  • Python >=3.11 (3.12 recommended)
  • PyTorch ≥2.9.1

Google Colab

Open In 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=cu128

# create a new virtual environment
uv venv --python 3.12
source .venv/bin/activate

uv pip install torch==2.10.0 torchvision
uv pip install --no-build-isolation 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

Core symbols most depended-on inside this repo

validate_config
called by 307
src/axolotl/utils/config/__init__.py
load
called by 189
src/axolotl/loaders/model.py
get_logger
called by 160
src/axolotl/utils/logging.py
backward
called by 127
src/axolotl/kernels/lora.py
normalize_config
called by 107
src/axolotl/utils/config/__init__.py
train
called by 94
src/axolotl/train.py
load_datasets
called by 87
src/axolotl/common/datasets.py
check_model_output_exists
called by 77
tests/e2e/utils.py

Shape

Method 2,953
Function 1,957
Class 906
Route 66

Languages

Python100%

Modules by API surface

src/axolotl/utils/schemas/validation.py117 symbols
tests/test_processing_strategies.py110 symbols
tests/integrations/test_swanlab.py86 symbols
tests/patched/test_validation.py80 symbols
tests/integrations/test_nemo_gym.py76 symbols
tests/e2e/integrations/test_scattermoe_lora_kernels.py76 symbols
src/axolotl/core/trainers/grpo/async_trainer.py70 symbols
tests/e2e/kernels/test_lora_features.py67 symbols
tests/conftest.py65 symbols
src/axolotl/integrations/base.py60 symbols
src/axolotl/processing_strategies.py57 symbols
tests/e2e/integrations/test_scattermoe_lora_olmoe.py55 symbols

Dependencies from manifests, versioned

PyYAML6.0 · 1×
accelerate1.13.0 · 1×
addict
adlfs2024.5.0 · 1×
antlr4-python3-runtime4.13.2 · 1×
art
axolotl-contribs-lgpl0.0.7 · 1×
axolotl-contribs-mit0.0.6 · 1×
evaluate0.4.1 · 1×
fastcore

For agents

$ claude mcp add axolotl \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact