- 需要在一套代码里跑多种对齐方法(SFT→DPO→ORPO)做对比实验:换配置字段而不是换训练脚本,省掉每换一种方法就重写一遍 Trainer 的工作
- 多机多卡训练要切换 FSDP2 / DeepSpeed 策略:配置里换一行而不是改启动脚本和 launcher 参数,适合集群上反复调并行方案的场景
- 微调完要直接出 GGUF 给 llama.cpp / Ollama 部署:内置导出省掉单独跑 convert 脚本和量化流程的环节
- 团队里有人不熟 PyTorch 训练循环但要跑微调:YAML 是交接面,比传一个 fork 过的 train.py 更容易 review 和复现
专家点评
上手难度:进阶更新于 2026-11-11用 YAML 配置替代手写训练脚本,把 LoRA/QLoRA 到 DPO/GRPO 的微调流程固定成可复现的配置文件
适用场景
踩坑
- 安装阶段最容易卡在 PyTorch 后端:README 要求先设 UV_TORCH_BACKEND(示例 cu130)再装,否则会拉到不匹配的 torch 版本;issue 里 bitsandbytes 在 macOS 上找不到匹配分发的报错被反复提出,说明非 NVIDIA 环境不是一等公民
- 新模型支持滞后于发布节奏:Phi 3、command-r 这类模型支持是以 issue 形式提上来的,选型时如果模型很新,先确认配置目录里有没有对应 yml,别假设框架已跟上
- 默认开遥测,需要显式设 AXOLOTL_DO_NOT_TRACK=1;另外训练前必须先 axolotl fetch examples 才有配置可跑,直接 clone 仓库找不到示例 yml
同类对比
和 Unsloth 的分流点在于:单卡、追求显存和速度优化选 Unsloth(issue 里也有人提整合它的优化);需要多机多卡、多种对齐方法和可复现配置管理,axolotl 更合适。纯手写 HuggingFace Trainer 脚本在只跑一种固定流程时反而更少一层抽象。
curl -LsSf https://astral.sh/uv/install.sh | sh
export UV_TORCH_BACKEND=cu130
uv venv --python 3.12
source .venv/bin/activate
uv pip install torch==2.14.0 torchvision
uv pip install axolotl[deepspeed]
axolotl fetch examples
axolotl train examples/llama-3/lora-1b.ymlREADME 未给出具体显存要求;安装示例使用 CUDA 13.0 的 PyTorch 后端,Docker 启动需 --gpus all,说明主要面向 NVIDIA GPU 环境。
项目说明
由 README 自动翻译提炼开源 LLM 微调框架,用 YAML 配置就能跑 LoRA、QLoRA 和多机多卡训练
一站式大模型微调工具,支持 LoRA、QLoRA、全参等多种训练方式,用配置文件就能跑起各种开源模型的微调任务。
核心能力
- 用 YAML 配置文件驱动 LoRA、QLoRA 等微调流程
- 支持 SFT、DPO、KTO、ORPO、GRPO 与奖励模型训练
- 提供 FSDP2、DeepSpeed、专家并行与上下文并行等分布式方案
- 内置 GGUF 导出,可量化后部署到 llama.cpp 与 Ollama
- 自带面向 AI 编码代理的文档,可用 axolotl agent-docs 查询
容易踩的坑
需先按系统设置 UV_TORCH_BACKEND(示例为 cu130),否则可能装错 PyTorch 版本;训练前要先执行 axolotl fetch examples 拿到示例配置;默认开启遥测,需设置 AXOLOTL_DO_NOT_TRACK=1 关闭。
- v0.21.1最新正式版2026-10-27 · 2026-10-27 09:57 UTC
Axolotl v0.21.1 Release Notes
45 commits since v0.21.0 (October 16, 2026).
This release makes long LoRA runs on large MoEs like Beam smoother, and includes a security update for the compromised eMudhra intermediate CAs.
We also added merge-aware LoRA for RL, per-group eval metrics, and full-turn labeling for tool-calling SFT, and fixed several bugs that trained silently on the wrong loss, activation, or gradients.
Highlights
Checkpoint Mirroring and Save Retries
You can now save checkpoints to fast local storage and keep training while they copy to shared storage in the background, and a save that hits a full disk pauses and retries so you can free space.
Set
checkpoint_mirrorandcheckpoint_save_retry. Read the guide.- Contributed by @winglian in #4184.
Sharded LoRA Adapter Checkpoints
You can now checkpoint FSDP2 LoRA and QLoRA runs without a rank 0 gather, cutting a Beam EP=8 checkpoint stall from about 2:20 to 11.6 s.
Set
adapter_checkpoint_format: sharded; examples are inexamples/expert_parallel/.- Contributed by @winglian and @NanoCode012 in #4188.
Heads up: EP checkpoints saved model-only or sharded can no longer be resumed by older Axolotl versions.
Per-Group Eval Metrics
You can now track eval metrics per domain or task, such as
eval/math/loss, alongside the aggregate.Add
eval_nameto yourtest_datasetsentries. Check the docs.- Contributed by @winglian in #4177.
Full-Turn Labeling for Tool-Calling SFT
You can now train the whole assistant turn on Harmony-style templates, including the channel headers the default labeling left untrained.
Set
generation_tags: trueon achat_templatedataset. Tool results with only atool_call_idalso no longer fail to render. Learn how it works.- Contributed by @winglian and @NanoCode012 in #4178, and @winglian in #4174.
Merge-Aware BF16 LoRA for RL
You can now train LoRA RL on exactly the BF16-rounded weights a merged vLLM sync serves. On Qwen3-0.6B-Base it reached standard LoRA's step-100 MATH-500 accuracy by about step 82.
Set
lora_merge_aware: bf16. Merged-sync runs also now log how much of each LoRA update survives the rounding (trl.vllm_merge_check_interval, on by default). Read more.- Contributed by @winglian in #4216.
Performance & Kernel Optimizations
- SonicMoE autotune (#4198 by @winglian): new routed row counts now reuse a power-of-two bucket's winner by default instead of starting a fresh 40 to 76 candidate sweep mid-run.
quack_autotune: falseskips sweeps, andautotune_profilescan pin quack configs. - SonicMoE EP row padding and LoRA split (#4198 by @winglian): opt-in high-water row padding and local-pair compaction for EP, and experimental
sonicmoe_lora_splitto run expert LoRA as separate low-rank GEMMs. - FA4 on Blackwell with
nvidia-cutlass-dsl>=4.6.2(#4187 by @winglian): runs no longer fall back silently to FA2, which is about 2 to 2.5x slower on attention at Beam's shapes. - FA4 attention savable under selective checkpointing (#4191 by @winglian):
save: [attention]previously recomputed it anyway. - Faster NVFP4 LoRA merges (#4175, #4199, #4205 by @winglian): chunked expert merges, reordered tensors with opt-in
merge_compile, and batched pinned transfers. A rank-128 merge into Beam is at least 27% faster with 8 GB less peak memory (#4199).
New Features
- Activation offloading without gradient checkpointing, and in GRPO (#4142 by @winglian and @NanoCode012):
gradient_checkpointingnow decides whe
- v0.21.02026-10-16 · 2026-10-16 13:52 UTC
查看更新说明
Axolotl v0.21.0 Release Notes
59 commits since v0.20.0 (September 30, 2026).
This release is headlined by Reflection's Beam, a 501B-parameter MoE you can QLoRA-tune on a single node. We also added native diffusion language model training, image datasets for DPO, KTO, and GRPO, and optimizations for the training loop.
Highlights
Reflection Beam
You can now fine-tune Reflection's Beam, a 501B-parameter MoE with 23B active parameters, using QLoRA on a single 8xH200 node.
QLoRA configs ship for FSDP2 and
device_map, plus expert-parallel LoRA recipes for B200 in bf16, NVFP4, and NF4. Get started with the Beam guide.- Contributed by @HamidShojanazeri and @winglian in #4148, and @NanoCode012 in #4163.
Native Diffusion LM Training
You can now fine-tune diffusion language models (Nemotron-Labs-Diffusion 3B and 8B, Dream v0, and DiffusionGemma) with a top-level
diffusion_lm:block and your usual chat datasets, no plugin required.examples/nemotron-diffusion/lora-smoke.yamlis a 3B LoRA starting point. Read more.- Contributed by @winglian in #4113.
Typed-Decision Training on Diffusion LMs
You can now train a diffusion LM to fill typed decisions (labels, distributions, label sets, soft scores) at fixed slots, including image-grounded decisions on Nemotron-Labs-Diffusion-VLM-8B.
Enable
DiffusionDecisionPluginand start from the 8B text and VLM recipes inexamples/nemotron-diffusion/. Learn how it works.- Contributed by @winglian in #4117, #4126, #4127, and #4130.
Multimodal DPO, KTO, and GRPO
You can now run DPO, IPO, KTO, GRPO, and GDPO on image datasets with vision-language models such as Qwen, SmolVLM2, and Gemma.
axolotl vllm-servealso now runs vLLM's native OpenAI-compatible server. Check the docs.- Contributed by @NanoCode012 in #4039, with @ved1beta and @winglian.
Heads up:
vllm>=0.30.0is now required.Context Parallelism Under DeepSpeed
You can now set
context_parallel_sizealongsidedeepspeed:, which maps onto DeepSpeed's Ulysses implementation.Qwen3.5 and Qwen3-Next gated-delta layers also move to Ringmaster's context-parallel kernel interface and now trace under
torch.compile. Read the guide.- Contributed by @winglian in #4091, and @thad0ctor and @winglian in #4102.
Plugins That Load Themselves
You can now ship an Axolotl plugin or model-support profile as a pip package, registered through the
axolotl.pluginsoraxolotl.model_supportentry points, with noplugins:entry needed.Context and expert parallelism now load this way, so EP configs no longer list a plugin. Learn how to publish one.
- Contributed by @winglian in #4089.
Performance & Kernel Optimizations
- Fewer host-device syncs (#4143 by @winglian and @NanoCode012): packed flash-attention LoRA on Llama-3.1-8B now pays 1 sync per micro-step instead of 390, and Qwen3-8B LoRA trains about 8% faster in eager mode.
- FlashAttention varlen metadata precomputed in the collator for compiled packed runs (#4100 by @thad0ctor and @winglian), now on for every packed run (#4143).
- Faster large-MoE loading (#4151 by @winglian): fused-expert conversion on a 500B-class MoE dropped from about 20 to 6 minutes.
- Kernel autotune caching (#4151 by @winglian):
autotune_cache_path,autotune_profiles, andautotune_neighborhoodstop EP ranks from re-benchmarking mid-run, and the default search space is smaller (#4116 by @winglian). - Context-parallel shards cut in the collator (#4144 by @wingl
- v0.20.02026-09-30 · 2026-09-30 14:08 UTC
查看更新说明
Axolotl v0.20.0 Release Notes
There has been 67 commits since v0.19.0 (September 10, 2026).
We have added a bunch of features including GGUF export, Ringmaster context parallelism, native NVFP4 LoRA, and expert parallelism without DeepEP. Python 3.12 and torch 2.13.0 are now the minimums, and FSDP1 is removed.
Highlights
GGUF Export
You can now convert a trained checkpoint to GGUF for llama.cpp, Ollama, LM Studio, and llamafile with
axolotl export config.yml --quantize Q4_K_M,Q8_0, which emits the base conversion plus one file per requested quant type.- Contributed by @ved1beta in #3950.
Context Parallelism with Ringmaster
You can now train long-context runs with packed sequences under Ulysses, Ring, or USP context parallelism, with experimental support for recurrent layers (GDN, KDA, Mamba2) that carry state across shards.
Setting
context_parallel_size, or acontext_parallel:block to pick the backend and Ulysses/Ring sizes, enables it without aplugins:entry; install withpip install axolotl[ringmaster].examples/distributed-parallel/llama3-8b-ringmaster-cp.yamlpairs it with FSDP2. See the guide.- Contributed by @winglian in #3844 and #4053.
Native NVFP4 LoRA with Merge-Aware Training
You can now LoRA-train on a frozen native NVFP4 base under FSDP2, DeepSpeed ZeRO-1/2/3, or tensor parallelism, and the merged checkpoint matches what you trained: the forward runs on the same quantized base-plus-adapter weight that
axolotl merge-lorawrites.Merge-aware training is on by default for supported ModelOpt/SonicMoE and native TorchAO paths, and
nvfp4_merge_aware: falseopts out. See the guide.- Contributed by @winglian in #4045, #4044, and #4035.
Expert Parallelism Without DeepEP
You can now run expert parallelism on any GPU setup through a plain
all_to_allbackend, and compose it with FSDP2, HSDP, and context parallelism for full-parameter or LoRA MoE training at node scale.expert_parallel_backend: autouses DeepEP when installed and the torch backend otherwise, andexpert_parallel_dispatch_chunksoverlaps dispatch with the expert GEMMs. EP now requiresfsdp_version: 2withstate_dict_type: FULL_STATE_DICT, and EP with tensor parallelism is rejected. See the guide.- Contributed by @winglian in #4070.
CPU-Staged NF4 Loading for FSDP2 QLoRA
You can now load an FSDP2 QLoRA run without the load-time GPU OOM: rank zero stages and quantizes the NF4 weights on CPU and distributes the shards, and bitsandbytes quantization is chunked so tensors above the int32 element limit no longer fail.
qlora_sharded_model_loadingnow defaults on for FSDP2 QLoRA withcpu_ram_efficient_loading, andnf4_backend: torchaoselects torchao'sNF4Tensoras an alternative to bitsandbytes, MoE experts included. Prequantized bitsandbytes 4-bit checkpoints also load this way, and their adapters merge to a bf16 base. See the guide.- Contributed by @winglian in #4003, #4023, and #4027.
Remote Training on More Clouds
You can now launch
axolotl train --cloudon Baseten and, experimentally, Nebius Serverless Jobs alongside Modal, and new providers can ship as plugins through theaxolotl.cloud_providersentry point.Set
provider:in your cloud config, plusimageorimage_buildto run a prebuilt or locally built image. See the docs. Hugging Face Jobs has its own guide.- Contributed by @winglian in #4028, @SalikovAlex in #3994, and @davanstrien in #4042.
**Nemotron-3 LatentMoE on the MoE
- v0.19.02026-09-10 · 2026-09-10 14:19 UTC
查看更新说明
Axolotl v0.19.0 Release Notes
72 commits since v0.18.0 (July 17, 2026).
We have a variety of changes this release including a new declarative model-support system, seven new model families plus ternary (BitNet b1.58) QAT, two new optimizers, a big chat-template tokenization speedup, and PyTorch 2.13 support.
Highlights
Declarative Model Support Profiles
Adding a new architecture used to mean edits scattered across the loaders. A model now picks a family template (
VANILLA_CAUSAL_LM,IMAGE_TEXT_TO_TEXT) and declares only what makes it different.Existing descriptors keep working, and there are no config changes. See the guide.
- Contributed by @thad0ctor in #3869 and @winglian in #3884.
Qwen3.8-Flash-Next
You can now fine-tune Qwen's 176.94B multimodal MoE on a single B300, in as little as 120 GiB with
ple_cpu_offload: true, for a minor throughput tradeoff.QLoRA, vision QLoRA, and NVFP4 MoE-LoRA configs all ship. See the guide.
- Contributed by @NanoCode012 in #3965.
Ternary (BitNet b1.58) QAT
qat: weight_dtype: ternarytrains a model with its weights restricted to{-1, 0, 1}, natively, with no extra dependency.examples/neutrino/has the two-stage recipe Fermion used for Neutrino-1: ternary continued pretraining, then instruction tuning on top.- Contributed by @ved1beta in #3933.
Two New Optimizers: PoLoRA and AdamC
PoLoRA, a Muon-like optimizer for LoRAs. Set
optimizer: polorawith LoRA or QLoRA, on single GPU, DDP, or FSDP2.optimizer: adamcadds Adam with corrected weight decay, which scales decay by learning rate.- Contributed by @NanoCode012 in #3938 and @ved1beta in #3929.
Chat-Template Tokenization speedup
Long multi-turn conversations no longer make preprocessing look like it has hung. An 80-turn conversation on Qwen2.5 went from 1577.6 ms to 96.4 ms, a 16.4x speedup.
The gains are most apparent with conversation length.
- Contributed by @ved1beta in #3750.
Six More Model Families
Ling 3.0 (Flash and Tiny), Muse Glimmer 30B, Cohere North Micro Vision Instruct, Shieldstral, Qwen3.8 27B, and Nemotron 3.5 Lightning 30B-A3B, each with example configs.
- Contributed by @NanoCode012 in #3931, #3932, and #3922, and @ved1beta in #3935, #3945, and #3949.
Performance & Kernel Optimizations
- Faster bnb NF4 dequant (#3882 by @NanoCode012): pass raw pointers and ints to the bitsandbytes dequant entry points when the 0.50.0+
argtypesare present.
New Features
- TRL 1.9.0 and new GRPO knobs (#3875 by @ved1beta):
cfg.trlnow surfaces entropy regularization (entropy_coef,use_adaptive_entropy,entropy_target,entropy_coef_delta/min/max), bidirectional importance-sampling clipping (vllm_importance_sampling_clip_min/max), andlog_multimodal;scale_rewardswidens to acceptgroup/batch/nonealongside the old boolean. See the GRPO docs. - Explicit
flash_attention_4andflash_attention_torchbackends (#3847 by @NanoCode012): FA4 was previously reachable only by auto-upgrade from FA2; it is now a canonicalattn_implementationvalue, alongside torch's own varlen backend, both supporting varlen sample packing.flash_attention_torchhas a preflight validator that fails clearly when the installed transformers does not register it. - Configurable FP8 scaling recipes (#3969 by @JimmyWang0417):
fp8_config.recipeselects TorchAO'stensorwise(the default),rowwise, orrowwise_with_gw_hp. `fp8_enable_fsdp_floa
- v0.18.02026-07-17 · 2026-07-17 12:28 UTC
查看更新说明
Axolotl v0.18.0 Release Notes
We've been hard at work doing low level improvements in the kernels. Over 90 commits since v0.17.0 (June 3, 2026), themed around fine-tuning very large sparse-MoE models cheaply: 4-bit expert LoRA/QLoRA (NVFP4, MXFP4, bnb) that runs fast and stays memory-flat at long context on Blackwell and Hopper, plus a supply-chain hardening pass on CI.
Highlights
NVFP4 MoE-LoRA: ScatterMoE and SonicMoE
4-bit NVFP4 expert LoRA now runs fast on both MoE kernel backends.
ScatterMoE
ScatterMoE gains fused NVFP4 (Marlin/DeepGEMM) and bnb-4bit expert paths for Gemma 4 (128 experts) and DeepSeek-V4. Active VRAM stays nearly flat from 4k to 32k context: NVFP4 is fastest at short sequences, bnb uses the least memory.
Configs:
examples/gemma4/26b-a4b-moe-nvfp4-lora.yaml(ScatterMoE)- Contributed by @winglian in #3747
SonicMoE
SonicMoE adds native FP4-activation MoE-LoRA (W4A4: 4-bit weights and activations) through the quack/CUTLASS kernels. On B200 it beats the Marlin W4A16 (16-bit-activation) path at every sequence length at matched quality, validated on the Qwen3-30B-A3B and Qwen3-Next-80B-A3B NVFP4 checkpoints.
It also runs on consumer Blackwell (RTX 50xx / sm120) via the quack 0.6 migration (#3830), and the new
nvfp4_merge_awaremode keeps the adapter bitwise-consistent when merged back into the NVFP4 base (#3822).Configs:
examples/qwen3/30b-a3b-nvfp4-lora.yaml(SonicMoE).- Contributed by @NanoCode012 in #3780, #3822, and #3830.
GLM-5.2 (DSA) Fine-tuning with 2D Expert Parallelism
Fine-tune GLM-5.2 (
glm_moe_dsa) from its NVFP4 checkpoint on multi-GPU FSDP2. It follows the DeepSeek-V3.2 sparse-MLA lineage: 256 routed experts with Lightning-Indexer token selection. DeepEP expert parallelism now composes in 2D (EP × cp), and dedicated DSA attention kernels (use_glm_dsa_kernels) with rank0 + broadcast loading keep the ~250 GB 4-bit experts from OOMing on load. Config:examples/glm_moe_dsa/glm-5.2-nvfp4-lora.yaml(requiresdeep_ep).- Contributed by @winglian in #3759, with post-merge fixes in #3781 (@NanoCode012) and #3832.
Hidden-States Activation Offloading for Long-Context Full-Parameter Training
New
activation_offloading: hidden_statesoffloads only the per-layer checkpoint input to CPU and recomputes the rest, so PCIe stays within budget where the offload-everything mode saturates it. On Qwen3-8B full-param it reaches 128k context where plain gradient checkpointing OOMs, and the memory advantage widens with sequence length (1.23x less at 64k, tied throughput) with bit-exact gradients.- Contributed by @winglian in #3733 and #3776.
Multi-Turn Inference Chat Interface
axolotl inference config.yaml --chatstarts an interactive multi-turn chat with streaming token output, runtime-adjustable generation parameters, and streaming reasoning blocks for thinking models.- Contributed by @NanoCode012 in #3723.
Performance & Kernel Optimizations
- Blackwell (sm120) MoE-LoRA (#3714 by @winglian): makes the vendored ScatterMoE Triton path the working MoE+LoRA story on sm120 where the SonicMoE CUTLASS kernel can't compile. EP sentinel-skip drops masked remote rows (2 to 10x fwd+bwd at ep 2 to 8), gpt_oss layout support (9.5 to 48x vs eager), fused MXFP4 with no dequant (1.7 to 3.7x, 16 t
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
🎉 Latest Updates
- 2026/10:
- MistralAI's Mistral Large 4 is now supported in Axolotl, with merge-aware NVFP4 LoRA and expert-parallel training.
- Reflection's Beam is now supported in Axolotl, with QLoRA and expert-parallel LoRA configs including NVFP4.
- Distributed training improvements keep EP groups node-local when the topology permits, add DeepSpeed Ulysses support through
context_parallel_size, and fix expert-LoRA resume and FSDP2 activation checkpointing with LoRA.
- 2026/09:
- New model support has been added in Axolotl for MiniCPM5, Nex-N2.5-mini, Qwen3.6, Qwen3.8-Flash-Next, and K2 Horizon.
- CPU-staged FSDP2 QLoRA loading lets you load models larger than a single GPU's memory without materializing a full quantized replica on each GPU.
- GGUF export is now available via
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:
- New model support has been added in Axolotl for Ling 3.0, Muse Glimmer, North Micro Vision Instruct and Shieldstral.
- 2026/07:
- NVFP4 (4-bit) MoE LoRA training is now supported via ScatterMoE (W4A16) and SonicMoE (W4A4), including adapter merge back into a plain NVFP4 checkpoint.
- 2026/06:
- Expert Parallelism (EP) for distributed MoE training via DeepEP, remote training through Tinker-compatible APIs, Context Parallelism for hybrid SSM models (Nemotron-H, Falcon-H1, Bamba), BitNet 1.58-bit fine-tuning, and a multimodal assistant-only loss-masking fix.
- 2026/04:
- New model support has been added in Axolotl for Mistral Medium 3.5 and Gemma 4.
- New RL and kernels: Async GRPO (up to 58% faster steps), Flash Attention 4, NeMo Gym, and EBFT.
- Axolotl is now uv-first and has SonicMoE fused LoRA support.
- 2026/03:
- New model support has been added in Axolotl for Mistral Small 4, Qwen3.5, Qwen3.5 MoE, GLM-4.7-Flash, GLM-4.6V, and GLM-4.5-Air.
- MoE expert quantization support (via
quantize_moe_experts: true) greatly reduces VRAM when training MoE models (FSDP2 compat).
- 2026/02:
- ScatterMoE LoRA support. LoRA fine-tuning directly on MoE expert weights using custom Triton kernels.
- Axolotl now has support for SageAttention and GDPO (Generalized DPO).
- 2026/01:
- New integration for EAFT (Entropy-Aware Focal Training), weights loss by entropy of the top-k logit distribution, and Scalable Softmax, improves long context in attention.
- 2025/12:
- Axolotl now includes support for Kimi-Linear, Plano-Orchestrator, MiMo, InternVL 3.5, Olmo3, Trinity, and Ministral3.
- Distributed Muon Optimizer support has been added for FSDP2 pretraining.
- 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:
- 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:
- 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.