{
  "type": "comparison",
  "id": "fine-tuning-frameworks",
  "title": "Fine-tuning frameworks compared — Axolotl, LLaMA-Factory and Unsloth",
  "summary": "Compare Axolotl, LLaMA-Factory and Unsloth as SFT, LoRA/QLoRA and preference-tuning frameworks for tool-use models: documented methods, config style, chat/tool datasets, hardware backends, licences and current versions. Cross-links the agent RL stacks comparison.",
  "author": "Agentica Author",
  "tags": [
    "fine-tuning",
    "training",
    "lora",
    "tool-calling",
    "python"
  ],
  "published": "2026-11-11",
  "updated": "2026-11-12",
  "last_verified": "2026-11-12",
  "entries": [
    "axolotl",
    "llama-factory",
    "unsloth",
    "trl",
    "peft",
    "ms-swift",
    "torchtune",
    "verl",
    "skyrl",
    "agent-lightning",
    "openpipe-art"
  ],
  "links": {
    "html": "https://indexagentica.com/compare/fine-tuning-frameworks/",
    "markdown": "https://indexagentica.com/compare/fine-tuning-frameworks.md",
    "json": "https://indexagentica.com/api/longform/compare/fine-tuning-frameworks.json",
    "source": "https://github.com/Drudley/indexagentica/blob/main/content-long/compare/fine-tuning-frameworks.md"
  },
  "status": "published",
  "comparison": {
    "subjects": [
      {
        "id": "axolotl",
        "name": "Axolotl",
        "summary": "Apache-2.0 post-training / fine-tuning framework for a wide range of LLMs, with CLI, YAML configs, Docker and distributed-training options.",
        "url": "https://indexagentica.com/entries/axolotl/",
        "json": "https://indexagentica.com/api/entries/axolotl.json"
      },
      {
        "id": "llama-factory",
        "name": "LLaMA-Factory",
        "summary": "Apache-2.0 toolkit to fine-tune 100+ LLMs and VLMs via zero-code CLI and the LLaMA Board Gradio web UI.",
        "url": "https://indexagentica.com/entries/llama-factory/",
        "json": "https://indexagentica.com/api/entries/llama-factory.json"
      },
      {
        "id": "unsloth",
        "name": "Unsloth",
        "summary": "Open-source LLM fine-tuning library and desktop app for running and training models locally, with a dual Apache-2.0 / AGPL-3.0 license split.",
        "url": "https://indexagentica.com/entries/unsloth/",
        "json": "https://indexagentica.com/api/entries/unsloth.json"
      }
    ],
    "criteria": [
      "Config style",
      "Documented methods",
      "Tool-calling and chat data",
      "Hardware and backends",
      "License and versions"
    ],
    "rows": {
      "axolotl": {
        "Config style": "YAML configs reused across preprocess, train, eval, quantization and inference, driven by the axolotl CLI (train, fetch, agent-docs, config-schema). Docker images and a PyPI package are documented.",
        "Documented methods": "Full fine-tuning, LoRA, QLoRA, GPTQ, QAT (int8/int4/FP8/NVFP4/MXFP4), preference tuning (DPO, IPO, KTO, ORPO), RL (GRPO, GDPO), and reward / process reward modelling. The agent-docs CLI also lists SimPO under preference tuning.",
        "Tool-calling and chat data": "Conversation datasets via chat_template: ShareGPT or OpenAI-style messages, tokenizer or custom Jinja templates, multi-turn versus single-turn instruct. Tool use is documented with a tools column and assistant tool_calls / tool roles (JSON Schema tools).",
        "Hardware and backends": "README: NVIDIA GPU (Ampere or newer for bf16 and Flash Attention) or AMD GPU; Python >=3.12; PyTorch >=2.13.0. Multi-GPU via FSDP2 and DeepSpeed; multi-node via Torchrun or Ray. Docker is documented.",
        "License and versions": "Apache-2.0 (LICENSE); PyPI axolotl 0.21.1 and GitHub release v0.21.1; Python >=3.12 (checked 2026-11-11)"
      },
      "llama-factory": {
        "Config style": "Zero-code CLI (llamafactory-cli train, chat, export) with YAML examples, plus the LLaMA Board Gradio web UI (llamafactory-cli webui). Custom datasets are registered in data/dataset_info.json.",
        "Documented methods": "README table: pre-training, SFT, reward modeling, PPO, DPO, KTO, ORPO and SimPO, each with full, freeze, LoRA, QLoRA, OFT and QOFT. GRPO is not in that table; the changelog points to a separate EasyR1 project for GRPO.",
        "Tool-calling and chat data": "Alpaca and ShareGPT formats (OpenAI messages are documented as a ShareGPT special case). ShareGPT documents human/gpt/observation/function_call roles and an optional tools column; Glaive Function Calling and AgentInstruct are listed SFT datasets.",
        "Hardware and backends": "Python >=3.11. Optional CUDA (min 11.6, recommend 12.2), DeepSpeed, bitsandbytes, vLLM and FlashAttention. Docker paths for CUDA, AMD ROCm and Ascend NPU. The README includes an estimated VRAM table, marked as estimated.",
        "License and versions": "Apache-2.0 (LICENSE); PyPI llamafactory 0.9.5 and GitHub release v0.9.5; Python >=3.11 (checked 2026-11-11). Model-weight licences are separate, as the README states."
      },
      "unsloth": {
        "Config style": "Three documented surfaces: the Unsloth Desktop app, Unsloth Studio web UI (unsloth studio), and Unsloth Core (Python: uv pip install unsloth --torch-backend=auto; FastLanguageModel).",
        "Documented methods": "README and docs list LoRA, QLoRA, full fine-tuning, pretraining, FP8, and RL including GRPO (GSPO via GRPOConfig). A preference page documents DPO, ORPO and KTO, and also mentions PPO and a SimPO notebook.",
        "Tool-calling and chat data": "The datasets guide covers raw corpus (CPT), instruct (SFT) and multi-turn conversation (SFT) in ShareGPT or ChatML/OpenAI messages, with standardize_sharegpt. Tool calling is documented mainly as a runtime/API loop, not as a dedicated training schema.",
        "Hardware and backends": "README: Windows, Linux, WSL and macOS; NVIDIA, AMD and Intel GPUs, CPUs and Vulkan. Multi-GPU is described via Accelerate/DeepSpeed (FSDP, DDP), with a note that official multi-GPU support is still being announced. AMD image: unsloth/unsloth-rocm.",
        "License and versions": "Dual licence: core Apache-2.0 (LICENSE; PyPI license_expression Apache-2.0); optional Studio UI AGPL-3.0 (studio/LICENSE.AGPL-3.0). PyPI unsloth 2026.11.3; Python >=3.9,<3.15 (checked 2026-11-11)."
      }
    },
    "table": [
      {
        "entry": "axolotl",
        "name": "Axolotl",
        "url": "https://indexagentica.com/entries/axolotl/",
        "values": {
          "Config style": "YAML configs reused across preprocess, train, eval, quantization and inference, driven by the axolotl CLI (train, fetch, agent-docs, config-schema). Docker images and a PyPI package are documented.",
          "Documented methods": "Full fine-tuning, LoRA, QLoRA, GPTQ, QAT (int8/int4/FP8/NVFP4/MXFP4), preference tuning (DPO, IPO, KTO, ORPO), RL (GRPO, GDPO), and reward / process reward modelling. The agent-docs CLI also lists SimPO under preference tuning.",
          "Tool-calling and chat data": "Conversation datasets via chat_template: ShareGPT or OpenAI-style messages, tokenizer or custom Jinja templates, multi-turn versus single-turn instruct. Tool use is documented with a tools column and assistant tool_calls / tool roles (JSON Schema tools).",
          "Hardware and backends": "README: NVIDIA GPU (Ampere or newer for bf16 and Flash Attention) or AMD GPU; Python >=3.12; PyTorch >=2.13.0. Multi-GPU via FSDP2 and DeepSpeed; multi-node via Torchrun or Ray. Docker is documented.",
          "License and versions": "Apache-2.0 (LICENSE); PyPI axolotl 0.21.1 and GitHub release v0.21.1; Python >=3.12 (checked 2026-11-11)"
        }
      },
      {
        "entry": "llama-factory",
        "name": "LLaMA-Factory",
        "url": "https://indexagentica.com/entries/llama-factory/",
        "values": {
          "Config style": "Zero-code CLI (llamafactory-cli train, chat, export) with YAML examples, plus the LLaMA Board Gradio web UI (llamafactory-cli webui). Custom datasets are registered in data/dataset_info.json.",
          "Documented methods": "README table: pre-training, SFT, reward modeling, PPO, DPO, KTO, ORPO and SimPO, each with full, freeze, LoRA, QLoRA, OFT and QOFT. GRPO is not in that table; the changelog points to a separate EasyR1 project for GRPO.",
          "Tool-calling and chat data": "Alpaca and ShareGPT formats (OpenAI messages are documented as a ShareGPT special case). ShareGPT documents human/gpt/observation/function_call roles and an optional tools column; Glaive Function Calling and AgentInstruct are listed SFT datasets.",
          "Hardware and backends": "Python >=3.11. Optional CUDA (min 11.6, recommend 12.2), DeepSpeed, bitsandbytes, vLLM and FlashAttention. Docker paths for CUDA, AMD ROCm and Ascend NPU. The README includes an estimated VRAM table, marked as estimated.",
          "License and versions": "Apache-2.0 (LICENSE); PyPI llamafactory 0.9.5 and GitHub release v0.9.5; Python >=3.11 (checked 2026-11-11). Model-weight licences are separate, as the README states."
        }
      },
      {
        "entry": "unsloth",
        "name": "Unsloth",
        "url": "https://indexagentica.com/entries/unsloth/",
        "values": {
          "Config style": "Three documented surfaces: the Unsloth Desktop app, Unsloth Studio web UI (unsloth studio), and Unsloth Core (Python: uv pip install unsloth --torch-backend=auto; FastLanguageModel).",
          "Documented methods": "README and docs list LoRA, QLoRA, full fine-tuning, pretraining, FP8, and RL including GRPO (GSPO via GRPOConfig). A preference page documents DPO, ORPO and KTO, and also mentions PPO and a SimPO notebook.",
          "Tool-calling and chat data": "The datasets guide covers raw corpus (CPT), instruct (SFT) and multi-turn conversation (SFT) in ShareGPT or ChatML/OpenAI messages, with standardize_sharegpt. Tool calling is documented mainly as a runtime/API loop, not as a dedicated training schema.",
          "Hardware and backends": "README: Windows, Linux, WSL and macOS; NVIDIA, AMD and Intel GPUs, CPUs and Vulkan. Multi-GPU is described via Accelerate/DeepSpeed (FSDP, DDP), with a note that official multi-GPU support is still being announced. AMD image: unsloth/unsloth-rocm.",
          "License and versions": "Dual licence: core Apache-2.0 (LICENSE; PyPI license_expression Apache-2.0); optional Studio UI AGPL-3.0 (studio/LICENSE.AGPL-3.0). PyPI unsloth 2026.11.3; Python >=3.9,<3.15 (checked 2026-11-11)."
        }
      }
    ],
    "verdict": "Choose by workflow, not by unverified speed claims. Use Axolotl when you want a YAML/CLI pipeline that documents SFT, (Q)LoRA, preference tuning and GRPO in one project. Use LLaMA-Factory when you want a zero-code CLI or Gradio UI and an explicit ShareGPT tool-call dataset schema; treat EasyR1 as a separate GRPO project. Use Unsloth for a Python, Desktop or Studio workflow with documented LoRA/QLoRA and GRPO/DPO—and read the Apache-2.0/AGPL-3.0 split if you ship Studio UI. For multi-turn agent RL infrastructure, see the agent RL stacks comparison; these three are post-training frameworks."
  },
  "entries_detail": [
    {
      "id": "axolotl",
      "name": "Axolotl",
      "summary": "Apache-2.0 post-training / fine-tuning framework for a wide range of LLMs, with CLI, YAML configs, Docker and distributed-training options.",
      "url": "https://indexagentica.com/entries/axolotl/",
      "json": "https://indexagentica.com/api/entries/axolotl.json"
    },
    {
      "id": "llama-factory",
      "name": "LLaMA-Factory",
      "summary": "Apache-2.0 toolkit to fine-tune 100+ LLMs and VLMs via zero-code CLI and the LLaMA Board Gradio web UI.",
      "url": "https://indexagentica.com/entries/llama-factory/",
      "json": "https://indexagentica.com/api/entries/llama-factory.json"
    },
    {
      "id": "unsloth",
      "name": "Unsloth",
      "summary": "Open-source LLM fine-tuning library and desktop app for running and training models locally, with a dual Apache-2.0 / AGPL-3.0 license split.",
      "url": "https://indexagentica.com/entries/unsloth/",
      "json": "https://indexagentica.com/api/entries/unsloth.json"
    },
    {
      "id": "trl",
      "name": "TRL",
      "summary": "Hugging Face Transformer Reinforcement Learning library for post-training methods such as SFT, DPO, PPO and GRPO on top of transformers.",
      "url": "https://indexagentica.com/entries/trl/",
      "json": "https://indexagentica.com/api/entries/trl.json"
    },
    {
      "id": "peft",
      "name": "PEFT",
      "summary": "Hugging Face Parameter-Efficient Fine-Tuning library (LoRA and related methods) for adapting large models without full fine-tuning.",
      "url": "https://indexagentica.com/entries/peft/",
      "json": "https://indexagentica.com/api/entries/peft.json"
    },
    {
      "id": "ms-swift",
      "name": "ms-SWIFT",
      "summary": "ModelScope SWIFT toolkit for training, fine-tuning, deploying and evaluating 100+ LLMs and multimodal models (Apache-2.0).",
      "url": "https://indexagentica.com/entries/ms-swift/",
      "json": "https://indexagentica.com/api/entries/ms-swift.json"
    },
    {
      "id": "torchtune",
      "name": "torchtune",
      "summary": "PyTorch-native BSD-3-Clause library for authoring, fine-tuning and evaluating LLMs with native PyTorch training primitives.",
      "url": "https://indexagentica.com/entries/torchtune/",
      "json": "https://indexagentica.com/api/entries/torchtune.json"
    },
    {
      "id": "verl",
      "name": "verl",
      "summary": "Distributed reinforcement-learning training library for LLMs, with GRPO/PPO dataflows and pluggable training and rollout engines for agentic post-training.",
      "url": "https://indexagentica.com/entries/verl/",
      "json": "https://indexagentica.com/api/entries/verl.json"
    },
    {
      "id": "skyrl",
      "name": "SkyRL",
      "summary": "Modular reinforcement-learning stack with a training engine, long-horizon agent layer and Gymnasium-style tool-use environments for LLMs.",
      "url": "https://indexagentica.com/entries/skyrl/",
      "json": "https://indexagentica.com/api/entries/skyrl.json"
    },
    {
      "id": "agent-lightning",
      "name": "Agent Lightning",
      "summary": "Microsoft's lightweight agentic RL framework that trains models through real agent harnesses unchanged, using a proxy gateway, verl/vLLM trainer and Kubernetes rollouts.",
      "url": "https://indexagentica.com/entries/agent-lightning/",
      "json": "https://indexagentica.com/api/entries/agent-lightning.json"
    },
    {
      "id": "openpipe-art",
      "name": "ART (Agent Reinforcement Trainer)",
      "summary": "Open-source Python framework for training multi-step agents with GRPO, with an OpenAI-compatible client and a separate GPU training server.",
      "url": "https://indexagentica.com/entries/openpipe-art/",
      "json": "https://indexagentica.com/api/entries/openpipe-art.json"
    }
  ],
  "related": [
    {
      "type": "comparison",
      "id": "agent-reinforcement-learning-stacks",
      "title": "Agent RL stacks compared — verl, SkyRL, Agent Lightning and ART",
      "url": "https://indexagentica.com/compare/agent-reinforcement-learning-stacks/",
      "json": "https://indexagentica.com/api/longform/compare/agent-reinforcement-learning-stacks.json"
    },
    {
      "type": "stack",
      "id": "post-training-tool-use-model",
      "title": "Post-training a tool-use model — TRL, PEFT, and scale-out RL",
      "url": "https://indexagentica.com/stacks/post-training-tool-use-model/",
      "json": "https://indexagentica.com/api/longform/stacks/post-training-tool-use-model.json"
    }
  ],
  "sources": [
    {
      "title": "Axolotl README (raw)",
      "url": "https://raw.githubusercontent.com/axolotl-ai-cloud/axolotl/main/README.md",
      "accessed": "2026-11-11"
    },
    {
      "title": "Axolotl LICENSE (raw)",
      "url": "https://raw.githubusercontent.com/axolotl-ai-cloud/axolotl/main/LICENSE",
      "accessed": "2026-11-11"
    },
    {
      "title": "axolotl 0.21.1 on PyPI",
      "url": "https://pypi.org/project/axolotl/0.21.1/",
      "accessed": "2026-11-11"
    },
    {
      "title": "Axolotl conversation dataset formats",
      "url": "https://docs.axolotl.ai/docs/dataset-formats/conversation.html",
      "accessed": "2026-11-11"
    },
    {
      "title": "Axolotl dataset formats index",
      "url": "https://docs.axolotl.ai/docs/dataset-formats/",
      "accessed": "2026-11-11"
    },
    {
      "title": "Axolotl multi-GPU training",
      "url": "https://docs.axolotl.ai/docs/multi-gpu.html",
      "accessed": "2026-11-11"
    },
    {
      "title": "LLaMA-Factory README (raw)",
      "url": "https://raw.githubusercontent.com/hiyouga/LlamaFactory/main/README.md",
      "accessed": "2026-11-11"
    },
    {
      "title": "LLaMA-Factory LICENSE (raw)",
      "url": "https://raw.githubusercontent.com/hiyouga/LlamaFactory/main/LICENSE",
      "accessed": "2026-11-11"
    },
    {
      "title": "LLaMA-Factory data README (raw)",
      "url": "https://raw.githubusercontent.com/hiyouga/LlamaFactory/main/data/README.md",
      "accessed": "2026-11-11"
    },
    {
      "title": "llamafactory 0.9.5 on PyPI",
      "url": "https://pypi.org/project/llamafactory/0.9.5/",
      "accessed": "2026-11-11"
    },
    {
      "title": "Unsloth README (raw)",
      "url": "https://raw.githubusercontent.com/unslothai/unsloth/main/README.md",
      "accessed": "2026-11-11"
    },
    {
      "title": "Unsloth LICENSE (raw, Apache-2.0)",
      "url": "https://raw.githubusercontent.com/unslothai/unsloth/main/LICENSE",
      "accessed": "2026-11-11"
    },
    {
      "title": "Unsloth Studio LICENSE.AGPL-3.0 (raw)",
      "url": "https://raw.githubusercontent.com/unslothai/unsloth/main/studio/LICENSE.AGPL-3.0",
      "accessed": "2026-11-11"
    },
    {
      "title": "unsloth 2026.11.3 on PyPI",
      "url": "https://pypi.org/project/unsloth/2026.11.3/",
      "accessed": "2026-11-11"
    },
    {
      "title": "Unsloth datasets guide (Markdown)",
      "url": "https://unsloth.ai/docs/get-started/fine-tuning-llms-guide/datasets-guide.md",
      "accessed": "2026-11-11"
    },
    {
      "title": "Unsloth fine-tuning LLMs guide (Markdown)",
      "url": "https://unsloth.ai/docs/get-started/fine-tuning-llms-guide.md",
      "accessed": "2026-11-11"
    },
    {
      "title": "Unsloth chat templates (Markdown)",
      "url": "https://unsloth.ai/docs/basics/chat-templates.md",
      "accessed": "2026-11-11"
    },
    {
      "title": "Unsloth tool calling guide (Markdown)",
      "url": "https://unsloth.ai/docs/basics/tool-calling-guide-for-local-llms.md",
      "accessed": "2026-11-11"
    },
    {
      "title": "Unsloth RL guide (Markdown)",
      "url": "https://unsloth.ai/docs/get-started/reinforcement-learning-rl-guide.md",
      "accessed": "2026-11-11"
    },
    {
      "title": "Unsloth preference training — DPO, ORPO and KTO (Markdown)",
      "url": "https://unsloth.ai/docs/get-started/reinforcement-learning-rl-guide/preference-dpo-orpo-and-kto.md",
      "accessed": "2026-11-11"
    },
    {
      "title": "Unsloth multi-GPU fine-tuning (Markdown)",
      "url": "https://unsloth.ai/docs/basics/multi-gpu-training-with-unsloth.md",
      "accessed": "2026-11-11"
    },
    {
      "title": "axolotl-ai-cloud/axolotl latest GitHub release",
      "url": "https://api.github.com/repos/axolotl-ai-cloud/axolotl/releases/latest",
      "accessed": "2026-11-11"
    },
    {
      "title": "hiyouga/LlamaFactory latest GitHub release",
      "url": "https://api.github.com/repos/hiyouga/LlamaFactory/releases/latest",
      "accessed": "2026-11-11"
    },
    {
      "title": "unslothai/unsloth latest GitHub release",
      "url": "https://api.github.com/repos/unslothai/unsloth/releases/latest",
      "accessed": "2026-11-11"
    },
    {
      "title": "huggingface/trl README",
      "url": "https://raw.githubusercontent.com/huggingface/trl/main/README.md",
      "accessed": "2026-11-12"
    },
    {
      "title": "huggingface/trl LICENSE",
      "url": "https://raw.githubusercontent.com/huggingface/trl/main/LICENSE",
      "accessed": "2026-11-12"
    },
    {
      "title": "TRL PyPI metadata",
      "url": "https://pypi.org/pypi/trl/json",
      "accessed": "2026-11-12"
    },
    {
      "title": "huggingface/trl latest GitHub release",
      "url": "https://api.github.com/repos/huggingface/trl/releases/latest",
      "accessed": "2026-11-12"
    },
    {
      "title": "TRL documentation index",
      "url": "https://huggingface.co/docs/trl/index",
      "accessed": "2026-11-12"
    },
    {
      "title": "huggingface/peft README",
      "url": "https://raw.githubusercontent.com/huggingface/peft/main/README.md",
      "accessed": "2026-11-12"
    },
    {
      "title": "huggingface/peft LICENSE",
      "url": "https://raw.githubusercontent.com/huggingface/peft/main/LICENSE",
      "accessed": "2026-11-12"
    },
    {
      "title": "PEFT PyPI metadata",
      "url": "https://pypi.org/pypi/peft/json",
      "accessed": "2026-11-12"
    },
    {
      "title": "huggingface/peft latest GitHub release",
      "url": "https://api.github.com/repos/huggingface/peft/releases/latest",
      "accessed": "2026-11-12"
    },
    {
      "title": "PEFT documentation index",
      "url": "https://huggingface.co/docs/peft/index",
      "accessed": "2026-11-12"
    },
    {
      "title": "modelscope/ms-swift README",
      "url": "https://raw.githubusercontent.com/modelscope/ms-swift/main/README.md",
      "accessed": "2026-11-12"
    },
    {
      "title": "modelscope/ms-swift LICENSE",
      "url": "https://raw.githubusercontent.com/modelscope/ms-swift/main/LICENSE",
      "accessed": "2026-11-12"
    },
    {
      "title": "ms-swift PyPI metadata",
      "url": "https://pypi.org/pypi/ms-swift/json",
      "accessed": "2026-11-12"
    },
    {
      "title": "modelscope/ms-swift latest GitHub release",
      "url": "https://api.github.com/repos/modelscope/ms-swift/releases/latest",
      "accessed": "2026-11-12"
    },
    {
      "title": "ms-SWIFT documentation",
      "url": "https://swift.readthedocs.io/en/latest/",
      "accessed": "2026-11-12"
    },
    {
      "title": "meta-pytorch/torchtune README",
      "url": "https://raw.githubusercontent.com/meta-pytorch/torchtune/main/README.md",
      "accessed": "2026-11-12"
    },
    {
      "title": "meta-pytorch/torchtune LICENSE",
      "url": "https://raw.githubusercontent.com/meta-pytorch/torchtune/main/LICENSE",
      "accessed": "2026-11-12"
    },
    {
      "title": "torchtune PyPI metadata",
      "url": "https://pypi.org/pypi/torchtune/json",
      "accessed": "2026-11-12"
    },
    {
      "title": "The future of torchtune (GitHub issue #2883)",
      "url": "https://github.com/meta-pytorch/torchtune/issues/2883",
      "accessed": "2026-11-12"
    },
    {
      "title": "torchtune documentation",
      "url": "https://meta-pytorch.org/torchtune/main/",
      "accessed": "2026-11-12"
    }
  ],
  "front_matter": {
    "id": "fine-tuning-frameworks",
    "type": "comparison",
    "title": "Fine-tuning frameworks compared — Axolotl, LLaMA-Factory and Unsloth",
    "summary": "Compare Axolotl, LLaMA-Factory and Unsloth as SFT, LoRA/QLoRA and preference-tuning frameworks for tool-use models: documented methods, config style, chat/tool datasets, hardware backends, licences and current versions. Cross-links the agent RL stacks comparison.",
    "description": "A source-checked comparison of Axolotl, LLaMA-Factory and Unsloth for post-training tool-use and chat models. Covers documented methods (SFT, LoRA/QLoRA, DPO/ORPO/KTO, GRPO only where each project lists it), YAML/CLI/Python/UI config style, multi-turn chat-template and tool-calling dataset support, hardware backends, licences (including Unsloth's Apache-2.0/AGPL-3.0 split) and PyPI versions checked 2026-11-11. Positioned against the agent reinforcement-learning stacks comparison rather than as a substitute. No training run; vendor speed and VRAM figures are not treated as independent measurements. An Other options section added 2026-11-12 points to TRL, PEFT, ms-SWIFT and the deprecated torchtune entry, and to the recommended TRL+PEFT post-training stack.",
    "author": "Agentica Author",
    "tags": [
      "fine-tuning",
      "training",
      "lora",
      "tool-calling",
      "python"
    ],
    "entries": [
      "axolotl",
      "llama-factory",
      "unsloth",
      "trl",
      "peft",
      "ms-swift",
      "torchtune"
    ],
    "related": [
      "agent-reinforcement-learning-stacks",
      "post-training-tool-use-model"
    ],
    "subjects": [
      "axolotl",
      "llama-factory",
      "unsloth"
    ],
    "criteria": [
      "Config style",
      "Documented methods",
      "Tool-calling and chat data",
      "Hardware and backends",
      "License and versions"
    ],
    "rows": {
      "axolotl": {
        "Config style": "YAML configs reused across preprocess, train, eval, quantization and inference, driven by the axolotl CLI (train, fetch, agent-docs, config-schema). Docker images and a PyPI package are documented.",
        "Documented methods": "Full fine-tuning, LoRA, QLoRA, GPTQ, QAT (int8/int4/FP8/NVFP4/MXFP4), preference tuning (DPO, IPO, KTO, ORPO), RL (GRPO, GDPO), and reward / process reward modelling. The agent-docs CLI also lists SimPO under preference tuning.",
        "Tool-calling and chat data": "Conversation datasets via chat_template: ShareGPT or OpenAI-style messages, tokenizer or custom Jinja templates, multi-turn versus single-turn instruct. Tool use is documented with a tools column and assistant tool_calls / tool roles (JSON Schema tools).",
        "Hardware and backends": "README: NVIDIA GPU (Ampere or newer for bf16 and Flash Attention) or AMD GPU; Python >=3.12; PyTorch >=2.13.0. Multi-GPU via FSDP2 and DeepSpeed; multi-node via Torchrun or Ray. Docker is documented.",
        "License and versions": "Apache-2.0 (LICENSE); PyPI axolotl 0.21.1 and GitHub release v0.21.1; Python >=3.12 (checked 2026-11-11)"
      },
      "llama-factory": {
        "Config style": "Zero-code CLI (llamafactory-cli train, chat, export) with YAML examples, plus the LLaMA Board Gradio web UI (llamafactory-cli webui). Custom datasets are registered in data/dataset_info.json.",
        "Documented methods": "README table: pre-training, SFT, reward modeling, PPO, DPO, KTO, ORPO and SimPO, each with full, freeze, LoRA, QLoRA, OFT and QOFT. GRPO is not in that table; the changelog points to a separate EasyR1 project for GRPO.",
        "Tool-calling and chat data": "Alpaca and ShareGPT formats (OpenAI messages are documented as a ShareGPT special case). ShareGPT documents human/gpt/observation/function_call roles and an optional tools column; Glaive Function Calling and AgentInstruct are listed SFT datasets.",
        "Hardware and backends": "Python >=3.11. Optional CUDA (min 11.6, recommend 12.2), DeepSpeed, bitsandbytes, vLLM and FlashAttention. Docker paths for CUDA, AMD ROCm and Ascend NPU. The README includes an estimated VRAM table, marked as estimated.",
        "License and versions": "Apache-2.0 (LICENSE); PyPI llamafactory 0.9.5 and GitHub release v0.9.5; Python >=3.11 (checked 2026-11-11). Model-weight licences are separate, as the README states."
      },
      "unsloth": {
        "Config style": "Three documented surfaces: the Unsloth Desktop app, Unsloth Studio web UI (unsloth studio), and Unsloth Core (Python: uv pip install unsloth --torch-backend=auto; FastLanguageModel).",
        "Documented methods": "README and docs list LoRA, QLoRA, full fine-tuning, pretraining, FP8, and RL including GRPO (GSPO via GRPOConfig). A preference page documents DPO, ORPO and KTO, and also mentions PPO and a SimPO notebook.",
        "Tool-calling and chat data": "The datasets guide covers raw corpus (CPT), instruct (SFT) and multi-turn conversation (SFT) in ShareGPT or ChatML/OpenAI messages, with standardize_sharegpt. Tool calling is documented mainly as a runtime/API loop, not as a dedicated training schema.",
        "Hardware and backends": "README: Windows, Linux, WSL and macOS; NVIDIA, AMD and Intel GPUs, CPUs and Vulkan. Multi-GPU is described via Accelerate/DeepSpeed (FSDP, DDP), with a note that official multi-GPU support is still being announced. AMD image: unsloth/unsloth-rocm.",
        "License and versions": "Dual licence: core Apache-2.0 (LICENSE; PyPI license_expression Apache-2.0); optional Studio UI AGPL-3.0 (studio/LICENSE.AGPL-3.0). PyPI unsloth 2026.11.3; Python >=3.9,<3.15 (checked 2026-11-11)."
      }
    },
    "verdict": "Choose by workflow, not by unverified speed claims. Use Axolotl when you want a YAML/CLI pipeline that documents SFT, (Q)LoRA, preference tuning and GRPO in one project. Use LLaMA-Factory when you want a zero-code CLI or Gradio UI and an explicit ShareGPT tool-call dataset schema; treat EasyR1 as a separate GRPO project. Use Unsloth for a Python, Desktop or Studio workflow with documented LoRA/QLoRA and GRPO/DPO—and read the Apache-2.0/AGPL-3.0 split if you ship Studio UI. For multi-turn agent RL infrastructure, see the agent RL stacks comparison; these three are post-training frameworks.",
    "sources": [
      {
        "title": "Axolotl README (raw)",
        "url": "https://raw.githubusercontent.com/axolotl-ai-cloud/axolotl/main/README.md",
        "accessed": "2026-11-11"
      },
      {
        "title": "Axolotl LICENSE (raw)",
        "url": "https://raw.githubusercontent.com/axolotl-ai-cloud/axolotl/main/LICENSE",
        "accessed": "2026-11-11"
      },
      {
        "title": "axolotl 0.21.1 on PyPI",
        "url": "https://pypi.org/project/axolotl/0.21.1/",
        "accessed": "2026-11-11"
      },
      {
        "title": "Axolotl conversation dataset formats",
        "url": "https://docs.axolotl.ai/docs/dataset-formats/conversation.html",
        "accessed": "2026-11-11"
      },
      {
        "title": "Axolotl dataset formats index",
        "url": "https://docs.axolotl.ai/docs/dataset-formats/",
        "accessed": "2026-11-11"
      },
      {
        "title": "Axolotl multi-GPU training",
        "url": "https://docs.axolotl.ai/docs/multi-gpu.html",
        "accessed": "2026-11-11"
      },
      {
        "title": "LLaMA-Factory README (raw)",
        "url": "https://raw.githubusercontent.com/hiyouga/LlamaFactory/main/README.md",
        "accessed": "2026-11-11"
      },
      {
        "title": "LLaMA-Factory LICENSE (raw)",
        "url": "https://raw.githubusercontent.com/hiyouga/LlamaFactory/main/LICENSE",
        "accessed": "2026-11-11"
      },
      {
        "title": "LLaMA-Factory data README (raw)",
        "url": "https://raw.githubusercontent.com/hiyouga/LlamaFactory/main/data/README.md",
        "accessed": "2026-11-11"
      },
      {
        "title": "llamafactory 0.9.5 on PyPI",
        "url": "https://pypi.org/project/llamafactory/0.9.5/",
        "accessed": "2026-11-11"
      },
      {
        "title": "Unsloth README (raw)",
        "url": "https://raw.githubusercontent.com/unslothai/unsloth/main/README.md",
        "accessed": "2026-11-11"
      },
      {
        "title": "Unsloth LICENSE (raw, Apache-2.0)",
        "url": "https://raw.githubusercontent.com/unslothai/unsloth/main/LICENSE",
        "accessed": "2026-11-11"
      },
      {
        "title": "Unsloth Studio LICENSE.AGPL-3.0 (raw)",
        "url": "https://raw.githubusercontent.com/unslothai/unsloth/main/studio/LICENSE.AGPL-3.0",
        "accessed": "2026-11-11"
      },
      {
        "title": "unsloth 2026.11.3 on PyPI",
        "url": "https://pypi.org/project/unsloth/2026.11.3/",
        "accessed": "2026-11-11"
      },
      {
        "title": "Unsloth datasets guide (Markdown)",
        "url": "https://unsloth.ai/docs/get-started/fine-tuning-llms-guide/datasets-guide.md",
        "accessed": "2026-11-11"
      },
      {
        "title": "Unsloth fine-tuning LLMs guide (Markdown)",
        "url": "https://unsloth.ai/docs/get-started/fine-tuning-llms-guide.md",
        "accessed": "2026-11-11"
      },
      {
        "title": "Unsloth chat templates (Markdown)",
        "url": "https://unsloth.ai/docs/basics/chat-templates.md",
        "accessed": "2026-11-11"
      },
      {
        "title": "Unsloth tool calling guide (Markdown)",
        "url": "https://unsloth.ai/docs/basics/tool-calling-guide-for-local-llms.md",
        "accessed": "2026-11-11"
      },
      {
        "title": "Unsloth RL guide (Markdown)",
        "url": "https://unsloth.ai/docs/get-started/reinforcement-learning-rl-guide.md",
        "accessed": "2026-11-11"
      },
      {
        "title": "Unsloth preference training — DPO, ORPO and KTO (Markdown)",
        "url": "https://unsloth.ai/docs/get-started/reinforcement-learning-rl-guide/preference-dpo-orpo-and-kto.md",
        "accessed": "2026-11-11"
      },
      {
        "title": "Unsloth multi-GPU fine-tuning (Markdown)",
        "url": "https://unsloth.ai/docs/basics/multi-gpu-training-with-unsloth.md",
        "accessed": "2026-11-11"
      },
      {
        "title": "axolotl-ai-cloud/axolotl latest GitHub release",
        "url": "https://api.github.com/repos/axolotl-ai-cloud/axolotl/releases/latest",
        "accessed": "2026-11-11"
      },
      {
        "title": "hiyouga/LlamaFactory latest GitHub release",
        "url": "https://api.github.com/repos/hiyouga/LlamaFactory/releases/latest",
        "accessed": "2026-11-11"
      },
      {
        "title": "unslothai/unsloth latest GitHub release",
        "url": "https://api.github.com/repos/unslothai/unsloth/releases/latest",
        "accessed": "2026-11-11"
      },
      {
        "title": "huggingface/trl README",
        "url": "https://raw.githubusercontent.com/huggingface/trl/main/README.md",
        "accessed": "2026-11-12"
      },
      {
        "title": "huggingface/trl LICENSE",
        "url": "https://raw.githubusercontent.com/huggingface/trl/main/LICENSE",
        "accessed": "2026-11-12"
      },
      {
        "title": "TRL PyPI metadata",
        "url": "https://pypi.org/pypi/trl/json",
        "accessed": "2026-11-12"
      },
      {
        "title": "huggingface/trl latest GitHub release",
        "url": "https://api.github.com/repos/huggingface/trl/releases/latest",
        "accessed": "2026-11-12"
      },
      {
        "title": "TRL documentation index",
        "url": "https://huggingface.co/docs/trl/index",
        "accessed": "2026-11-12"
      },
      {
        "title": "huggingface/peft README",
        "url": "https://raw.githubusercontent.com/huggingface/peft/main/README.md",
        "accessed": "2026-11-12"
      },
      {
        "title": "huggingface/peft LICENSE",
        "url": "https://raw.githubusercontent.com/huggingface/peft/main/LICENSE",
        "accessed": "2026-11-12"
      },
      {
        "title": "PEFT PyPI metadata",
        "url": "https://pypi.org/pypi/peft/json",
        "accessed": "2026-11-12"
      },
      {
        "title": "huggingface/peft latest GitHub release",
        "url": "https://api.github.com/repos/huggingface/peft/releases/latest",
        "accessed": "2026-11-12"
      },
      {
        "title": "PEFT documentation index",
        "url": "https://huggingface.co/docs/peft/index",
        "accessed": "2026-11-12"
      },
      {
        "title": "modelscope/ms-swift README",
        "url": "https://raw.githubusercontent.com/modelscope/ms-swift/main/README.md",
        "accessed": "2026-11-12"
      },
      {
        "title": "modelscope/ms-swift LICENSE",
        "url": "https://raw.githubusercontent.com/modelscope/ms-swift/main/LICENSE",
        "accessed": "2026-11-12"
      },
      {
        "title": "ms-swift PyPI metadata",
        "url": "https://pypi.org/pypi/ms-swift/json",
        "accessed": "2026-11-12"
      },
      {
        "title": "modelscope/ms-swift latest GitHub release",
        "url": "https://api.github.com/repos/modelscope/ms-swift/releases/latest",
        "accessed": "2026-11-12"
      },
      {
        "title": "ms-SWIFT documentation",
        "url": "https://swift.readthedocs.io/en/latest/",
        "accessed": "2026-11-12"
      },
      {
        "title": "meta-pytorch/torchtune README",
        "url": "https://raw.githubusercontent.com/meta-pytorch/torchtune/main/README.md",
        "accessed": "2026-11-12"
      },
      {
        "title": "meta-pytorch/torchtune LICENSE",
        "url": "https://raw.githubusercontent.com/meta-pytorch/torchtune/main/LICENSE",
        "accessed": "2026-11-12"
      },
      {
        "title": "torchtune PyPI metadata",
        "url": "https://pypi.org/pypi/torchtune/json",
        "accessed": "2026-11-12"
      },
      {
        "title": "The future of torchtune (GitHub issue #2883)",
        "url": "https://github.com/meta-pytorch/torchtune/issues/2883",
        "accessed": "2026-11-12"
      },
      {
        "title": "torchtune documentation",
        "url": "https://meta-pytorch.org/torchtune/main/",
        "accessed": "2026-11-12"
      }
    ],
    "last_verified": "2026-11-12",
    "published": "2026-11-11",
    "updated": "2026-11-12"
  },
  "markdown": "## SFT and LoRA trainers, not agent RL stacks\n\n[Agent RL stacks compared](https://indexagentica.com/compare/agent-reinforcement-learning-stacks/) covers distributed training engines and harness gateways — [verl](https://indexagentica.com/entries/verl/), [SkyRL](https://indexagentica.com/entries/skyrl/), [Agent Lightning](https://indexagentica.com/entries/agent-lightning/) and [OpenPipe ART](https://indexagentica.com/entries/openpipe-art/) — whose job is multi-turn agent reinforcement learning. This page is one layer down the training stack: **post-training frameworks** you use to run supervised fine-tuning, LoRA/QLoRA and preference optimization on chat and tool-use models.\n\nThe three directory entries are [Axolotl](https://indexagentica.com/entries/axolotl/), [LLaMA-Factory](https://indexagentica.com/entries/llama-factory/) and [Unsloth](https://indexagentica.com/entries/unsloth/). They overlap on (Q)LoRA and chat data, and some also document GRPO or PPO, but they are not drop-in substitutes for those RL stacks. For a library-level recommended path that starts with [TRL](https://indexagentica.com/entries/trl/) and [PEFT](https://indexagentica.com/entries/peft/) and then scales out with OpenRLHF or AReaL, see [Post-training a tool-use model](https://indexagentica.com/stacks/post-training-tool-use-model/). Other trainers, including [ms-SWIFT](https://indexagentica.com/entries/ms-swift/) and the deprecated [torchtune](https://indexagentica.com/entries/torchtune/) entry, are listed under Other options below. LLaMA-Factory’s README also lists Unsloth among optional training “tricks,” so the libraries can compose.\n\nThe comparison table is generated from the front matter. README and docs include vendor speed or VRAM figures (for example Unsloth’s “2× faster / 70% less VRAM” wording, or LLaMA-Factory’s starred estimated memory table). Those numbers are not independently verified here and are not used as selection criteria.\n\n## How you configure them\n\n**Axolotl** is YAML-first. The README says a single configuration file can be reused across dataset preprocessing, training, evaluation, quantization and inference. The CLI entry points include `axolotl train` (for example `axolotl train examples/llama-3/lora-1b.yml`), `axolotl fetch` for example configs, `axolotl agent-docs` for bundled method references, and `axolotl config-schema`. Installation is documented via `uv pip install axolotl[deepspeed]` after a pinned PyTorch, or with the `axolotlai/axolotl` Docker image.\n\n**LLaMA-Factory** advertises “zero-code” CLI and a Gradio **LLaMA Board** UI. The documented commands are `llamafactory-cli train`, `chat` and `export` on YAML files under `examples/`, plus `llamafactory-cli webui`. Custom datasets are registered in `data/dataset_info.json`; the data README is the format specification.\n\n**Unsloth** documents three surfaces: a native **Desktop** app (platform installers), **Studio** (`unsloth studio`, also install.sh / Homebrew / Docker `unsloth/unsloth`), and **Core**, the Python package installed with `uv pip install unsloth --torch-backend=auto` and used through `FastLanguageModel`. Training examples in the docs are Python (and Colab notebooks), not a project-wide YAML schema like Axolotl.\n\n## Documented methods — only what each project lists\n\nDo not assume every popular acronym is available in all three.\n\n- **Axolotl’s README** lists full fine-tuning, LoRA, QLoRA, GPTQ, QAT (int8/int4/FP8/NVFP4/MXFP4), preference tuning (**DPO, IPO, KTO, ORPO**), RL (**GRPO, GDPO**), and reward / process reward modelling. The bundled `axolotl agent-docs preference_tuning` help also names **SimPO**.\n- **LLaMA-Factory’s “Supported Training Approaches” table** lists pre-training, supervised fine-tuning, reward modeling, **PPO, DPO, KTO, ORPO and SimPO**, each available with full, freeze, LoRA, QLoRA, OFT and QOFT. **GRPO is not in that table.** The changelog announces **EasyR1** as a separate “efficient, scalable and multi-modality RL training framework for efficient GRPO training.” Treat EasyR1 as a sibling project, not as a LLaMA-Factory table row.\n- **Unsloth’s README** lists reinforcement learning, LoRA, QLoRA, full fine-tuning, pretraining, RL, **GRPO, DPO** and FP8. The fine-tuning guide describes LoRA versus QLoRA versus full fine-tuning. The RL guide documents **GRPO** (including `loss_type` values `gspo`, `grpo` and `dr_grpo` in `GRPOConfig`). A preference page states that **DPO, ORPO, PPO, KTO** “all work with Unsloth” and links Colab notebooks for GRPO, ORPO, DPO, KTO and SimPO.\n\n## Tool-calling and multi-turn chat data\n\nIf you are fine-tuning a **tool-use** model, the dataset schema matters as much as the trainer.\n\n- **Axolotl** conversation docs use a `chat_template` dataset type. Older ShareGPT `conversations` / `from` / `value` records can be mapped onto it; newer data typically uses OpenAI-style `messages` with `role` / `content`. Templates may come from the tokenizer, a named template, or a custom Jinja file. A dedicated **“Using tool use”** section documents a top-level `tools` array (JSON Schema function definitions) and assistant `tool_calls` plus `role: tool` turns. The docs warn you to check that the chosen chat template actually supports tools.\n- **LLaMA-Factory** supports **alpaca** and **sharegpt** formats (`data/README.md`). Alpaca can carry a multi-turn `history` list. ShareGPT allows extra roles: the defaults include `observation` for tool results and `function_call` for calls, plus an optional `tools` column. OpenAI-style `messages` are documented as a special case of ShareGPT. The README’s SFT dataset list includes **Glaive Function Calling V2** and **AgentInstruct**. Features also name “multi-turn dialogue” and “tool using” as tasks.\n- **Unsloth’s datasets guide** documents raw corpus (continued pretraining), instruct (SFT) and **multi-turn conversation** (SFT), with ShareGPT (`from`/`value`) and ChatML/OpenAI (`role`/`content`) examples and a `standardize_sharegpt` helper. The chat-templates page covers Conversational, ChatML, ShareGPT and Alpaca-style formatting in Python. **Tool calling is documented mainly as a runtime capability** (a local-LLM tool-calling guide with OpenAI-style `tool_calls` loops). The fine-tuning guide mentions tool-calling as a behavior you might train with RL and a reward function. This comparison does not treat that as the same kind of first-class SFT tool schema Axolotl and LLaMA-Factory publish.\n\n## Hardware and backends\n\n- **Axolotl** requires a NVIDIA GPU (Ampere or newer for bf16 and Flash Attention) or an AMD GPU, Python **>=3.12**, and PyTorch **≥2.13.0**. Multi-GPU is documented with FSDP2 and DeepSpeed; multi-node with Torchrun or Ray.\n- **LLaMA-Factory** requires Python **>=3.11**. Optional packages include CUDA (minimum 11.6, recommended 12.2), DeepSpeed, bitsandbytes, vLLM and FlashAttention. The README documents Docker flows for CUDA, **AMD ROCm** and **Ascend NPU**, plus a Megatron-core backend via `mcore_adapter`. Its hardware table is explicitly marked *estimated*.\n- **Unsloth** states that it works on Windows, Linux, WSL and macOS, and that it supports multi-GPU setups, NVIDIA, AMD and Intel GPUs, CPUs and the Vulkan backend. Core install uses `--torch-backend=auto`. An AMD Docker image `unsloth/unsloth-rocm` is documented. The multi-GPU page says Unsloth can already use Accelerate and DeepSpeed, including **FSDP** and **DDP** (`accelerate launch` / `torchrun`), but also that official multi-GPU support is still being announced and the setup is currently manual.\n\n## Licences and versions (11 November 2026)\n\nChecked on PyPI, GitHub latest releases, and each repository’s licence file(s):\n\n| Package | Licence file | PyPI / GitHub | Requires Python |\n|---|---|---|---|\n| axolotl | Apache License 2.0 (`LICENSE`) | 0.21.1 / v0.21.1 | >=3.12 |\n| llamafactory | Apache License 2.0 (`LICENSE`) | 0.9.5 / v0.9.5 | >=3.11 |\n| unsloth | Apache License 2.0 (`LICENSE`) for the core package; AGPL-3.0 (`studio/LICENSE.AGPL-3.0`) for optional Studio UI | PyPI 2026.11.3 (GitHub latest release tag v0.1.916-beta, same calendar day) | >=3.9,<3.15 |\n\nAxolotl’s PyPI metadata does not set a licence classifier; the Apache-2.0 text is from the repo `LICENSE`. Unsloth’s PyPI `license_expression` is Apache-2.0, which matches the core package, not the Studio UI. The Unsloth README states this dual-licensing model explicitly. Model weights, GPUs and any hosted extras remain separate from these software licences.\n\nWhen linking the LLaMA-Factory repository, use [hiyouga/LlamaFactory](https://github.com/hiyouga/LlamaFactory), the canonical path. The hyphenated `hiyouga/LLaMA-Factory` path redirects to it, so don't use that in published links.\n\n\n## Other options\n\nThe table above stays a three-way comparison of [Axolotl](https://indexagentica.com/entries/axolotl/), [LLaMA-Factory](https://indexagentica.com/entries/llama-factory/) and [Unsloth](https://indexagentica.com/entries/unsloth/). These related directory entries are not added as subjects, so the criteria rows stay focused on those YAML/UI-oriented frameworks.\n\n- **[TRL](https://indexagentica.com/entries/trl/)** (PyPI and GitHub latest 1.17.1, Apache-2.0, Python >=3.11) is a Transformers-based trainer library. The README documents `SFTTrainer`, `GRPOTrainer`, `DPOTrainer`, `KTOTrainer` and `RewardTrainer`, a CLI (`trl sft`, `trl dpo`, `trl kto`), Accelerate DDP, DeepSpeed ZeRO and FSDP, and full PEFT integration for LoRA/QLoRA. Docs: [huggingface.co/docs/trl/index](https://huggingface.co/docs/trl/index).\n- **[PEFT](https://indexagentica.com/entries/peft/)** (PyPI and GitHub latest 0.21.2, Apache-2.0, Python >=3.10) is the Hugging Face adapter library. The README quickstart uses `LoraConfig` and `get_peft_model`. Docs: [huggingface.co/docs/peft/index](https://huggingface.co/docs/peft/index).\n- Together they are the core of the recommended [post-training stack for a tool-use model](https://indexagentica.com/stacks/post-training-tool-use-model/).\n- **[ms-SWIFT](https://indexagentica.com/entries/ms-swift/)** (PyPI and GitHub latest 4.6.0, Apache-2.0, Python >=3.9) is ModelScope's CLI-first training framework (`swift sft`, `swift rlhf`, `swift infer`, plus `megatron sft`). Its training-methods table lists pre-training, supervised fine-tuning, GRPO, GKD, PPO, DPO, KTO, reward modelling, CPO, SimPO, ORPO, embedding, reranker and sequence classification, with full-parameter, LoRA and QLoRA columns (and DeepSpeed / multi-machine support). A separate Megatron-SWIFT table and a GRPO-family table (GRPO, DAPO, GSPO, SAPO, CISPO, CHORD, RLOO, Reinforce++) are also documented. Docs: [swift.readthedocs.io/en/latest/](https://swift.readthedocs.io/en/latest/).\n- **[torchtune](https://indexagentica.com/entries/torchtune/)** is **deprecated**. Its README states that it is no longer actively maintained and that development wound down in 2025, pointing at GitHub issue [#2883](https://github.com/meta-pytorch/torchtune/issues/2883) (\"The future of torchtune\"), which was still open on 12 November 2026. PyPI remains at 0.6.1 (BSD-3-Clause, uploaded 7 April 2025). The repository is not archived. Do not start a new training stack with it. Docs: [meta-pytorch.org/torchtune/main/](https://meta-pytorch.org/torchtune/main/).\n\n## What we ran, and what we did not\n\nWe did **not** install these packages or run CLI help against a live install. A useful smoke test (`axolotl config-schema`, `llamafactory-cli help`, or importing `FastLanguageModel`) would pull **PyTorch** and related CUDA/ROCm wheels, which is a large download and is not GPU-free in practice. No fine-tune was run, and no speed, memory or accuracy figure from project blogs or notebooks was reproduced.\n\n## A safe selection sequence\n\n1. **Name the layer.** If you need a multi-turn agent RL *stack* (rollouts, rewards, a training backend), start from [Agent RL stacks compared](https://indexagentica.com/compare/agent-reinforcement-learning-stacks/). If you want the Hugging Face trainer layer (TRL and PEFT) and a documented scale-out path, use [Post-training a tool-use model](https://indexagentica.com/stacks/post-training-tool-use-model/). If you need a YAML/UI-oriented SFT, (Q)LoRA or preference-tuning framework, stay on this page.\n2. **List the methods you actually need.** If you need GRPO in the same project as SFT, Axolotl and Unsloth document it; LLaMA-Factory’s official approaches table does not.\n3. **Check the dataset schema.** Tool-call SFT is explicitly specified in Axolotl’s conversation docs and LLaMA-Factory’s ShareGPT format. Unsloth’s first-class documented path is multi-turn ShareGPT/ChatML plus a separate runtime tool-calling guide.\n4. **Match hardware and licence.** Note Unsloth’s AGPL-3.0 Studio UI if you will ship that component; Axolotl and LLaMA-Factory are Apache-2.0. Confirm CUDA versus ROCm versus NPU install docs before you pin a stack.\n5. **Pin versions.** Record the PyPI versions above (or newer pins), the YAML or Python entry point, and any engine flags (DeepSpeed, FSDP, `loss_type` for GRPO).\n",
  "raw": "---\nid: fine-tuning-frameworks\ntype: comparison\ntitle: \"Fine-tuning frameworks compared — Axolotl, LLaMA-Factory and Unsloth\"\nsummary: \"Compare Axolotl, LLaMA-Factory and Unsloth as SFT, LoRA/QLoRA and preference-tuning frameworks for tool-use models: documented methods, config style, chat/tool datasets, hardware backends, licences and current versions. Cross-links the agent RL stacks comparison.\"\ndescription: \"A source-checked comparison of Axolotl, LLaMA-Factory and Unsloth for post-training tool-use and chat models. Covers documented methods (SFT, LoRA/QLoRA, DPO/ORPO/KTO, GRPO only where each project lists it), YAML/CLI/Python/UI config style, multi-turn chat-template and tool-calling dataset support, hardware backends, licences (including Unsloth's Apache-2.0/AGPL-3.0 split) and PyPI versions checked 2026-11-11. Positioned against the agent reinforcement-learning stacks comparison rather than as a substitute. No training run; vendor speed and VRAM figures are not treated as independent measurements. An Other options section added 2026-11-12 points to TRL, PEFT, ms-SWIFT and the deprecated torchtune entry, and to the recommended TRL+PEFT post-training stack.\"\nauthor: Agentica Author\ntags: [fine-tuning, training, lora, tool-calling, python]\nentries: [axolotl, llama-factory, unsloth, trl, peft, ms-swift, torchtune]\nrelated: [agent-reinforcement-learning-stacks, post-training-tool-use-model]\nsubjects: [axolotl, llama-factory, unsloth]\ncriteria:\n  - Config style\n  - Documented methods\n  - Tool-calling and chat data\n  - Hardware and backends\n  - License and versions\nrows:\n  axolotl:\n    Config style: \"YAML configs reused across preprocess, train, eval, quantization and inference, driven by the axolotl CLI (train, fetch, agent-docs, config-schema). Docker images and a PyPI package are documented.\"\n    Documented methods: \"Full fine-tuning, LoRA, QLoRA, GPTQ, QAT (int8/int4/FP8/NVFP4/MXFP4), preference tuning (DPO, IPO, KTO, ORPO), RL (GRPO, GDPO), and reward / process reward modelling. The agent-docs CLI also lists SimPO under preference tuning.\"\n    Tool-calling and chat data: \"Conversation datasets via chat_template: ShareGPT or OpenAI-style messages, tokenizer or custom Jinja templates, multi-turn versus single-turn instruct. Tool use is documented with a tools column and assistant tool_calls / tool roles (JSON Schema tools).\"\n    Hardware and backends: \"README: NVIDIA GPU (Ampere or newer for bf16 and Flash Attention) or AMD GPU; Python >=3.12; PyTorch >=2.13.0. Multi-GPU via FSDP2 and DeepSpeed; multi-node via Torchrun or Ray. Docker is documented.\"\n    License and versions: \"Apache-2.0 (LICENSE); PyPI axolotl 0.21.1 and GitHub release v0.21.1; Python >=3.12 (checked 2026-11-11)\"\n  llama-factory:\n    Config style: \"Zero-code CLI (llamafactory-cli train, chat, export) with YAML examples, plus the LLaMA Board Gradio web UI (llamafactory-cli webui). Custom datasets are registered in data/dataset_info.json.\"\n    Documented methods: \"README table: pre-training, SFT, reward modeling, PPO, DPO, KTO, ORPO and SimPO, each with full, freeze, LoRA, QLoRA, OFT and QOFT. GRPO is not in that table; the changelog points to a separate EasyR1 project for GRPO.\"\n    Tool-calling and chat data: \"Alpaca and ShareGPT formats (OpenAI messages are documented as a ShareGPT special case). ShareGPT documents human/gpt/observation/function_call roles and an optional tools column; Glaive Function Calling and AgentInstruct are listed SFT datasets.\"\n    Hardware and backends: \"Python >=3.11. Optional CUDA (min 11.6, recommend 12.2), DeepSpeed, bitsandbytes, vLLM and FlashAttention. Docker paths for CUDA, AMD ROCm and Ascend NPU. The README includes an estimated VRAM table, marked as estimated.\"\n    License and versions: \"Apache-2.0 (LICENSE); PyPI llamafactory 0.9.5 and GitHub release v0.9.5; Python >=3.11 (checked 2026-11-11). Model-weight licences are separate, as the README states.\"\n  unsloth:\n    Config style: \"Three documented surfaces: the Unsloth Desktop app, Unsloth Studio web UI (unsloth studio), and Unsloth Core (Python: uv pip install unsloth --torch-backend=auto; FastLanguageModel).\"\n    Documented methods: \"README and docs list LoRA, QLoRA, full fine-tuning, pretraining, FP8, and RL including GRPO (GSPO via GRPOConfig). A preference page documents DPO, ORPO and KTO, and also mentions PPO and a SimPO notebook.\"\n    Tool-calling and chat data: \"The datasets guide covers raw corpus (CPT), instruct (SFT) and multi-turn conversation (SFT) in ShareGPT or ChatML/OpenAI messages, with standardize_sharegpt. Tool calling is documented mainly as a runtime/API loop, not as a dedicated training schema.\"\n    Hardware and backends: \"README: Windows, Linux, WSL and macOS; NVIDIA, AMD and Intel GPUs, CPUs and Vulkan. Multi-GPU is described via Accelerate/DeepSpeed (FSDP, DDP), with a note that official multi-GPU support is still being announced. AMD image: unsloth/unsloth-rocm.\"\n    License and versions: \"Dual licence: core Apache-2.0 (LICENSE; PyPI license_expression Apache-2.0); optional Studio UI AGPL-3.0 (studio/LICENSE.AGPL-3.0). PyPI unsloth 2026.11.3; Python >=3.9,<3.15 (checked 2026-11-11).\"\nverdict: \"Choose by workflow, not by unverified speed claims. Use Axolotl when you want a YAML/CLI pipeline that documents SFT, (Q)LoRA, preference tuning and GRPO in one project. Use LLaMA-Factory when you want a zero-code CLI or Gradio UI and an explicit ShareGPT tool-call dataset schema; treat EasyR1 as a separate GRPO project. Use Unsloth for a Python, Desktop or Studio workflow with documented LoRA/QLoRA and GRPO/DPO—and read the Apache-2.0/AGPL-3.0 split if you ship Studio UI. For multi-turn agent RL infrastructure, see the agent RL stacks comparison; these three are post-training frameworks.\"\nsources:\n  - title: \"Axolotl README (raw)\"\n    url: https://raw.githubusercontent.com/axolotl-ai-cloud/axolotl/main/README.md\n    accessed: 2026-11-11\n  - title: \"Axolotl LICENSE (raw)\"\n    url: https://raw.githubusercontent.com/axolotl-ai-cloud/axolotl/main/LICENSE\n    accessed: 2026-11-11\n  - title: \"axolotl 0.21.1 on PyPI\"\n    url: https://pypi.org/project/axolotl/0.21.1/\n    accessed: 2026-11-11\n  - title: \"Axolotl conversation dataset formats\"\n    url: https://docs.axolotl.ai/docs/dataset-formats/conversation.html\n    accessed: 2026-11-11\n  - title: \"Axolotl dataset formats index\"\n    url: https://docs.axolotl.ai/docs/dataset-formats/\n    accessed: 2026-11-11\n  - title: \"Axolotl multi-GPU training\"\n    url: https://docs.axolotl.ai/docs/multi-gpu.html\n    accessed: 2026-11-11\n  - title: \"LLaMA-Factory README (raw)\"\n    url: https://raw.githubusercontent.com/hiyouga/LlamaFactory/main/README.md\n    accessed: 2026-11-11\n  - title: \"LLaMA-Factory LICENSE (raw)\"\n    url: https://raw.githubusercontent.com/hiyouga/LlamaFactory/main/LICENSE\n    accessed: 2026-11-11\n  - title: \"LLaMA-Factory data README (raw)\"\n    url: https://raw.githubusercontent.com/hiyouga/LlamaFactory/main/data/README.md\n    accessed: 2026-11-11\n  - title: \"llamafactory 0.9.5 on PyPI\"\n    url: https://pypi.org/project/llamafactory/0.9.5/\n    accessed: 2026-11-11\n  - title: \"Unsloth README (raw)\"\n    url: https://raw.githubusercontent.com/unslothai/unsloth/main/README.md\n    accessed: 2026-11-11\n  - title: \"Unsloth LICENSE (raw, Apache-2.0)\"\n    url: https://raw.githubusercontent.com/unslothai/unsloth/main/LICENSE\n    accessed: 2026-11-11\n  - title: \"Unsloth Studio LICENSE.AGPL-3.0 (raw)\"\n    url: https://raw.githubusercontent.com/unslothai/unsloth/main/studio/LICENSE.AGPL-3.0\n    accessed: 2026-11-11\n  - title: \"unsloth 2026.11.3 on PyPI\"\n    url: https://pypi.org/project/unsloth/2026.11.3/\n    accessed: 2026-11-11\n  - title: \"Unsloth datasets guide (Markdown)\"\n    url: https://unsloth.ai/docs/get-started/fine-tuning-llms-guide/datasets-guide.md\n    accessed: 2026-11-11\n  - title: \"Unsloth fine-tuning LLMs guide (Markdown)\"\n    url: https://unsloth.ai/docs/get-started/fine-tuning-llms-guide.md\n    accessed: 2026-11-11\n  - title: \"Unsloth chat templates (Markdown)\"\n    url: https://unsloth.ai/docs/basics/chat-templates.md\n    accessed: 2026-11-11\n  - title: \"Unsloth tool calling guide (Markdown)\"\n    url: https://unsloth.ai/docs/basics/tool-calling-guide-for-local-llms.md\n    accessed: 2026-11-11\n  - title: \"Unsloth RL guide (Markdown)\"\n    url: https://unsloth.ai/docs/get-started/reinforcement-learning-rl-guide.md\n    accessed: 2026-11-11\n  - title: \"Unsloth preference training — DPO, ORPO and KTO (Markdown)\"\n    url: https://unsloth.ai/docs/get-started/reinforcement-learning-rl-guide/preference-dpo-orpo-and-kto.md\n    accessed: 2026-11-11\n  - title: \"Unsloth multi-GPU fine-tuning (Markdown)\"\n    url: https://unsloth.ai/docs/basics/multi-gpu-training-with-unsloth.md\n    accessed: 2026-11-11\n  - title: \"axolotl-ai-cloud/axolotl latest GitHub release\"\n    url: https://api.github.com/repos/axolotl-ai-cloud/axolotl/releases/latest\n    accessed: 2026-11-11\n  - title: \"hiyouga/LlamaFactory latest GitHub release\"\n    url: https://api.github.com/repos/hiyouga/LlamaFactory/releases/latest\n    accessed: 2026-11-11\n  - title: \"unslothai/unsloth latest GitHub release\"\n    url: https://api.github.com/repos/unslothai/unsloth/releases/latest\n    accessed: 2026-11-11\n  - title: \"huggingface/trl README\"\n    url: https://raw.githubusercontent.com/huggingface/trl/main/README.md\n    accessed: 2026-11-12\n  - title: \"huggingface/trl LICENSE\"\n    url: https://raw.githubusercontent.com/huggingface/trl/main/LICENSE\n    accessed: 2026-11-12\n  - title: \"TRL PyPI metadata\"\n    url: https://pypi.org/pypi/trl/json\n    accessed: 2026-11-12\n  - title: \"huggingface/trl latest GitHub release\"\n    url: https://api.github.com/repos/huggingface/trl/releases/latest\n    accessed: 2026-11-12\n  - title: \"TRL documentation index\"\n    url: https://huggingface.co/docs/trl/index\n    accessed: 2026-11-12\n  - title: \"huggingface/peft README\"\n    url: https://raw.githubusercontent.com/huggingface/peft/main/README.md\n    accessed: 2026-11-12\n  - title: \"huggingface/peft LICENSE\"\n    url: https://raw.githubusercontent.com/huggingface/peft/main/LICENSE\n    accessed: 2026-11-12\n  - title: \"PEFT PyPI metadata\"\n    url: https://pypi.org/pypi/peft/json\n    accessed: 2026-11-12\n  - title: \"huggingface/peft latest GitHub release\"\n    url: https://api.github.com/repos/huggingface/peft/releases/latest\n    accessed: 2026-11-12\n  - title: \"PEFT documentation index\"\n    url: https://huggingface.co/docs/peft/index\n    accessed: 2026-11-12\n  - title: \"modelscope/ms-swift README\"\n    url: https://raw.githubusercontent.com/modelscope/ms-swift/main/README.md\n    accessed: 2026-11-12\n  - title: \"modelscope/ms-swift LICENSE\"\n    url: https://raw.githubusercontent.com/modelscope/ms-swift/main/LICENSE\n    accessed: 2026-11-12\n  - title: \"ms-swift PyPI metadata\"\n    url: https://pypi.org/pypi/ms-swift/json\n    accessed: 2026-11-12\n  - title: \"modelscope/ms-swift latest GitHub release\"\n    url: https://api.github.com/repos/modelscope/ms-swift/releases/latest\n    accessed: 2026-11-12\n  - title: \"ms-SWIFT documentation\"\n    url: https://swift.readthedocs.io/en/latest/\n    accessed: 2026-11-12\n  - title: \"meta-pytorch/torchtune README\"\n    url: https://raw.githubusercontent.com/meta-pytorch/torchtune/main/README.md\n    accessed: 2026-11-12\n  - title: \"meta-pytorch/torchtune LICENSE\"\n    url: https://raw.githubusercontent.com/meta-pytorch/torchtune/main/LICENSE\n    accessed: 2026-11-12\n  - title: \"torchtune PyPI metadata\"\n    url: https://pypi.org/pypi/torchtune/json\n    accessed: 2026-11-12\n  - title: \"The future of torchtune (GitHub issue #2883)\"\n    url: https://github.com/meta-pytorch/torchtune/issues/2883\n    accessed: 2026-11-12\n  - title: \"torchtune documentation\"\n    url: https://meta-pytorch.org/torchtune/main/\n    accessed: 2026-11-12\nlast_verified: 2026-11-12\npublished: 2026-11-11\nupdated: 2026-11-12\n---\n## SFT and LoRA trainers, not agent RL stacks\n\n[Agent RL stacks compared](https://indexagentica.com/compare/agent-reinforcement-learning-stacks/) covers distributed training engines and harness gateways — [verl](https://indexagentica.com/entries/verl/), [SkyRL](https://indexagentica.com/entries/skyrl/), [Agent Lightning](https://indexagentica.com/entries/agent-lightning/) and [OpenPipe ART](https://indexagentica.com/entries/openpipe-art/) — whose job is multi-turn agent reinforcement learning. This page is one layer down the training stack: **post-training frameworks** you use to run supervised fine-tuning, LoRA/QLoRA and preference optimization on chat and tool-use models.\n\nThe three directory entries are [Axolotl](https://indexagentica.com/entries/axolotl/), [LLaMA-Factory](https://indexagentica.com/entries/llama-factory/) and [Unsloth](https://indexagentica.com/entries/unsloth/). They overlap on (Q)LoRA and chat data, and some also document GRPO or PPO, but they are not drop-in substitutes for those RL stacks. For a library-level recommended path that starts with [TRL](https://indexagentica.com/entries/trl/) and [PEFT](https://indexagentica.com/entries/peft/) and then scales out with OpenRLHF or AReaL, see [Post-training a tool-use model](https://indexagentica.com/stacks/post-training-tool-use-model/). Other trainers, including [ms-SWIFT](https://indexagentica.com/entries/ms-swift/) and the deprecated [torchtune](https://indexagentica.com/entries/torchtune/) entry, are listed under Other options below. LLaMA-Factory’s README also lists Unsloth among optional training “tricks,” so the libraries can compose.\n\nThe comparison table is generated from the front matter. README and docs include vendor speed or VRAM figures (for example Unsloth’s “2× faster / 70% less VRAM” wording, or LLaMA-Factory’s starred estimated memory table). Those numbers are not independently verified here and are not used as selection criteria.\n\n## How you configure them\n\n**Axolotl** is YAML-first. The README says a single configuration file can be reused across dataset preprocessing, training, evaluation, quantization and inference. The CLI entry points include `axolotl train` (for example `axolotl train examples/llama-3/lora-1b.yml`), `axolotl fetch` for example configs, `axolotl agent-docs` for bundled method references, and `axolotl config-schema`. Installation is documented via `uv pip install axolotl[deepspeed]` after a pinned PyTorch, or with the `axolotlai/axolotl` Docker image.\n\n**LLaMA-Factory** advertises “zero-code” CLI and a Gradio **LLaMA Board** UI. The documented commands are `llamafactory-cli train`, `chat` and `export` on YAML files under `examples/`, plus `llamafactory-cli webui`. Custom datasets are registered in `data/dataset_info.json`; the data README is the format specification.\n\n**Unsloth** documents three surfaces: a native **Desktop** app (platform installers), **Studio** (`unsloth studio`, also install.sh / Homebrew / Docker `unsloth/unsloth`), and **Core**, the Python package installed with `uv pip install unsloth --torch-backend=auto` and used through `FastLanguageModel`. Training examples in the docs are Python (and Colab notebooks), not a project-wide YAML schema like Axolotl.\n\n## Documented methods — only what each project lists\n\nDo not assume every popular acronym is available in all three.\n\n- **Axolotl’s README** lists full fine-tuning, LoRA, QLoRA, GPTQ, QAT (int8/int4/FP8/NVFP4/MXFP4), preference tuning (**DPO, IPO, KTO, ORPO**), RL (**GRPO, GDPO**), and reward / process reward modelling. The bundled `axolotl agent-docs preference_tuning` help also names **SimPO**.\n- **LLaMA-Factory’s “Supported Training Approaches” table** lists pre-training, supervised fine-tuning, reward modeling, **PPO, DPO, KTO, ORPO and SimPO**, each available with full, freeze, LoRA, QLoRA, OFT and QOFT. **GRPO is not in that table.** The changelog announces **EasyR1** as a separate “efficient, scalable and multi-modality RL training framework for efficient GRPO training.” Treat EasyR1 as a sibling project, not as a LLaMA-Factory table row.\n- **Unsloth’s README** lists reinforcement learning, LoRA, QLoRA, full fine-tuning, pretraining, RL, **GRPO, DPO** and FP8. The fine-tuning guide describes LoRA versus QLoRA versus full fine-tuning. The RL guide documents **GRPO** (including `loss_type` values `gspo`, `grpo` and `dr_grpo` in `GRPOConfig`). A preference page states that **DPO, ORPO, PPO, KTO** “all work with Unsloth” and links Colab notebooks for GRPO, ORPO, DPO, KTO and SimPO.\n\n## Tool-calling and multi-turn chat data\n\nIf you are fine-tuning a **tool-use** model, the dataset schema matters as much as the trainer.\n\n- **Axolotl** conversation docs use a `chat_template` dataset type. Older ShareGPT `conversations` / `from` / `value` records can be mapped onto it; newer data typically uses OpenAI-style `messages` with `role` / `content`. Templates may come from the tokenizer, a named template, or a custom Jinja file. A dedicated **“Using tool use”** section documents a top-level `tools` array (JSON Schema function definitions) and assistant `tool_calls` plus `role: tool` turns. The docs warn you to check that the chosen chat template actually supports tools.\n- **LLaMA-Factory** supports **alpaca** and **sharegpt** formats (`data/README.md`). Alpaca can carry a multi-turn `history` list. ShareGPT allows extra roles: the defaults include `observation` for tool results and `function_call` for calls, plus an optional `tools` column. OpenAI-style `messages` are documented as a special case of ShareGPT. The README’s SFT dataset list includes **Glaive Function Calling V2** and **AgentInstruct**. Features also name “multi-turn dialogue” and “tool using” as tasks.\n- **Unsloth’s datasets guide** documents raw corpus (continued pretraining), instruct (SFT) and **multi-turn conversation** (SFT), with ShareGPT (`from`/`value`) and ChatML/OpenAI (`role`/`content`) examples and a `standardize_sharegpt` helper. The chat-templates page covers Conversational, ChatML, ShareGPT and Alpaca-style formatting in Python. **Tool calling is documented mainly as a runtime capability** (a local-LLM tool-calling guide with OpenAI-style `tool_calls` loops). The fine-tuning guide mentions tool-calling as a behavior you might train with RL and a reward function. This comparison does not treat that as the same kind of first-class SFT tool schema Axolotl and LLaMA-Factory publish.\n\n## Hardware and backends\n\n- **Axolotl** requires a NVIDIA GPU (Ampere or newer for bf16 and Flash Attention) or an AMD GPU, Python **>=3.12**, and PyTorch **≥2.13.0**. Multi-GPU is documented with FSDP2 and DeepSpeed; multi-node with Torchrun or Ray.\n- **LLaMA-Factory** requires Python **>=3.11**. Optional packages include CUDA (minimum 11.6, recommended 12.2), DeepSpeed, bitsandbytes, vLLM and FlashAttention. The README documents Docker flows for CUDA, **AMD ROCm** and **Ascend NPU**, plus a Megatron-core backend via `mcore_adapter`. Its hardware table is explicitly marked *estimated*.\n- **Unsloth** states that it works on Windows, Linux, WSL and macOS, and that it supports multi-GPU setups, NVIDIA, AMD and Intel GPUs, CPUs and the Vulkan backend. Core install uses `--torch-backend=auto`. An AMD Docker image `unsloth/unsloth-rocm` is documented. The multi-GPU page says Unsloth can already use Accelerate and DeepSpeed, including **FSDP** and **DDP** (`accelerate launch` / `torchrun`), but also that official multi-GPU support is still being announced and the setup is currently manual.\n\n## Licences and versions (11 November 2026)\n\nChecked on PyPI, GitHub latest releases, and each repository’s licence file(s):\n\n| Package | Licence file | PyPI / GitHub | Requires Python |\n|---|---|---|---|\n| axolotl | Apache License 2.0 (`LICENSE`) | 0.21.1 / v0.21.1 | >=3.12 |\n| llamafactory | Apache License 2.0 (`LICENSE`) | 0.9.5 / v0.9.5 | >=3.11 |\n| unsloth | Apache License 2.0 (`LICENSE`) for the core package; AGPL-3.0 (`studio/LICENSE.AGPL-3.0`) for optional Studio UI | PyPI 2026.11.3 (GitHub latest release tag v0.1.916-beta, same calendar day) | >=3.9,<3.15 |\n\nAxolotl’s PyPI metadata does not set a licence classifier; the Apache-2.0 text is from the repo `LICENSE`. Unsloth’s PyPI `license_expression` is Apache-2.0, which matches the core package, not the Studio UI. The Unsloth README states this dual-licensing model explicitly. Model weights, GPUs and any hosted extras remain separate from these software licences.\n\nWhen linking the LLaMA-Factory repository, use [hiyouga/LlamaFactory](https://github.com/hiyouga/LlamaFactory), the canonical path. The hyphenated `hiyouga/LLaMA-Factory` path redirects to it, so don't use that in published links.\n\n\n## Other options\n\nThe table above stays a three-way comparison of [Axolotl](https://indexagentica.com/entries/axolotl/), [LLaMA-Factory](https://indexagentica.com/entries/llama-factory/) and [Unsloth](https://indexagentica.com/entries/unsloth/). These related directory entries are not added as subjects, so the criteria rows stay focused on those YAML/UI-oriented frameworks.\n\n- **[TRL](https://indexagentica.com/entries/trl/)** (PyPI and GitHub latest 1.17.1, Apache-2.0, Python >=3.11) is a Transformers-based trainer library. The README documents `SFTTrainer`, `GRPOTrainer`, `DPOTrainer`, `KTOTrainer` and `RewardTrainer`, a CLI (`trl sft`, `trl dpo`, `trl kto`), Accelerate DDP, DeepSpeed ZeRO and FSDP, and full PEFT integration for LoRA/QLoRA. Docs: [huggingface.co/docs/trl/index](https://huggingface.co/docs/trl/index).\n- **[PEFT](https://indexagentica.com/entries/peft/)** (PyPI and GitHub latest 0.21.2, Apache-2.0, Python >=3.10) is the Hugging Face adapter library. The README quickstart uses `LoraConfig` and `get_peft_model`. Docs: [huggingface.co/docs/peft/index](https://huggingface.co/docs/peft/index).\n- Together they are the core of the recommended [post-training stack for a tool-use model](https://indexagentica.com/stacks/post-training-tool-use-model/).\n- **[ms-SWIFT](https://indexagentica.com/entries/ms-swift/)** (PyPI and GitHub latest 4.6.0, Apache-2.0, Python >=3.9) is ModelScope's CLI-first training framework (`swift sft`, `swift rlhf`, `swift infer`, plus `megatron sft`). Its training-methods table lists pre-training, supervised fine-tuning, GRPO, GKD, PPO, DPO, KTO, reward modelling, CPO, SimPO, ORPO, embedding, reranker and sequence classification, with full-parameter, LoRA and QLoRA columns (and DeepSpeed / multi-machine support). A separate Megatron-SWIFT table and a GRPO-family table (GRPO, DAPO, GSPO, SAPO, CISPO, CHORD, RLOO, Reinforce++) are also documented. Docs: [swift.readthedocs.io/en/latest/](https://swift.readthedocs.io/en/latest/).\n- **[torchtune](https://indexagentica.com/entries/torchtune/)** is **deprecated**. Its README states that it is no longer actively maintained and that development wound down in 2025, pointing at GitHub issue [#2883](https://github.com/meta-pytorch/torchtune/issues/2883) (\"The future of torchtune\"), which was still open on 12 November 2026. PyPI remains at 0.6.1 (BSD-3-Clause, uploaded 7 April 2025). The repository is not archived. Do not start a new training stack with it. Docs: [meta-pytorch.org/torchtune/main/](https://meta-pytorch.org/torchtune/main/).\n\n## What we ran, and what we did not\n\nWe did **not** install these packages or run CLI help against a live install. A useful smoke test (`axolotl config-schema`, `llamafactory-cli help`, or importing `FastLanguageModel`) would pull **PyTorch** and related CUDA/ROCm wheels, which is a large download and is not GPU-free in practice. No fine-tune was run, and no speed, memory or accuracy figure from project blogs or notebooks was reproduced.\n\n## A safe selection sequence\n\n1. **Name the layer.** If you need a multi-turn agent RL *stack* (rollouts, rewards, a training backend), start from [Agent RL stacks compared](https://indexagentica.com/compare/agent-reinforcement-learning-stacks/). If you want the Hugging Face trainer layer (TRL and PEFT) and a documented scale-out path, use [Post-training a tool-use model](https://indexagentica.com/stacks/post-training-tool-use-model/). If you need a YAML/UI-oriented SFT, (Q)LoRA or preference-tuning framework, stay on this page.\n2. **List the methods you actually need.** If you need GRPO in the same project as SFT, Axolotl and Unsloth document it; LLaMA-Factory’s official approaches table does not.\n3. **Check the dataset schema.** Tool-call SFT is explicitly specified in Axolotl’s conversation docs and LLaMA-Factory’s ShareGPT format. Unsloth’s first-class documented path is multi-turn ShareGPT/ChatML plus a separate runtime tool-calling guide.\n4. **Match hardware and licence.** Note Unsloth’s AGPL-3.0 Studio UI if you will ship that component; Axolotl and LLaMA-Factory are Apache-2.0. Confirm CUDA versus ROCm versus NPU install docs before you pin a stack.\n5. **Pin versions.** Record the PyPI versions above (or newer pins), the YAML or Python entry point, and any engine flags (DeepSpeed, FSDP, `loss_type` for GRPO).\n",
  "html": "<h2>SFT and LoRA trainers, not agent RL stacks</h2>\n<p><a href=\"/compare/agent-reinforcement-learning-stacks/\">Agent RL stacks compared</a> covers distributed training engines and harness gateways — <a href=\"/entries/verl/\">verl</a>, <a href=\"/entries/skyrl/\">SkyRL</a>, <a href=\"/entries/agent-lightning/\">Agent Lightning</a> and <a href=\"/entries/openpipe-art/\">OpenPipe ART</a> — whose job is multi-turn agent reinforcement learning. This page is one layer down the training stack: <strong>post-training frameworks</strong> you use to run supervised fine-tuning, LoRA/QLoRA and preference optimization on chat and tool-use models.</p>\n<p>The three directory entries are <a href=\"/entries/axolotl/\">Axolotl</a>, <a href=\"/entries/llama-factory/\">LLaMA-Factory</a> and <a href=\"/entries/unsloth/\">Unsloth</a>. They overlap on (Q)LoRA and chat data, and some also document GRPO or PPO, but they are not drop-in substitutes for those RL stacks. For a library-level recommended path that starts with <a href=\"/entries/trl/\">TRL</a> and <a href=\"/entries/peft/\">PEFT</a> and then scales out with OpenRLHF or AReaL, see <a href=\"/stacks/post-training-tool-use-model/\">Post-training a tool-use model</a>. Other trainers, including <a href=\"/entries/ms-swift/\">ms-SWIFT</a> and the deprecated <a href=\"/entries/torchtune/\">torchtune</a> entry, are listed under Other options below. LLaMA-Factory’s README also lists Unsloth among optional training “tricks,” so the libraries can compose.</p>\n<p>The comparison table is generated from the front matter. README and docs include vendor speed or VRAM figures (for example Unsloth’s “2× faster / 70% less VRAM” wording, or LLaMA-Factory’s starred estimated memory table). Those numbers are not independently verified here and are not used as selection criteria.</p>\n<h2>How you configure them</h2>\n<p><strong>Axolotl</strong> is YAML-first. The README says a single configuration file can be reused across dataset preprocessing, training, evaluation, quantization and inference. The CLI entry points include <code>axolotl train</code> (for example <code>axolotl train examples/llama-3/lora-1b.yml</code>), <code>axolotl fetch</code> for example configs, <code>axolotl agent-docs</code> for bundled method references, and <code>axolotl config-schema</code>. Installation is documented via <code>uv pip install axolotl[deepspeed]</code> after a pinned PyTorch, or with the <code>axolotlai/axolotl</code> Docker image.</p>\n<p><strong>LLaMA-Factory</strong> advertises “zero-code” CLI and a Gradio <strong>LLaMA Board</strong> UI. The documented commands are <code>llamafactory-cli train</code>, <code>chat</code> and <code>export</code> on YAML files under <code>examples/</code>, plus <code>llamafactory-cli webui</code>. Custom datasets are registered in <code>data/dataset_info.json</code>; the data README is the format specification.</p>\n<p><strong>Unsloth</strong> documents three surfaces: a native <strong>Desktop</strong> app (platform installers), <strong>Studio</strong> (<code>unsloth studio</code>, also install.sh / Homebrew / Docker <code>unsloth/unsloth</code>), and <strong>Core</strong>, the Python package installed with <code>uv pip install unsloth --torch-backend=auto</code> and used through <code>FastLanguageModel</code>. Training examples in the docs are Python (and Colab notebooks), not a project-wide YAML schema like Axolotl.</p>\n<h2>Documented methods — only what each project lists</h2>\n<p>Do not assume every popular acronym is available in all three.</p>\n<ul><li><strong>Axolotl’s README</strong> lists full fine-tuning, LoRA, QLoRA, GPTQ, QAT (int8/int4/FP8/NVFP4/MXFP4), preference tuning (<strong>DPO, IPO, KTO, ORPO</strong>), RL (<strong>GRPO, GDPO</strong>), and reward / process reward modelling. The bundled <code>axolotl agent-docs preference_tuning</code> help also names <strong>SimPO</strong>.</li><li><strong>LLaMA-Factory’s “Supported Training Approaches” table</strong> lists pre-training, supervised fine-tuning, reward modeling, <strong>PPO, DPO, KTO, ORPO and SimPO</strong>, each available with full, freeze, LoRA, QLoRA, OFT and QOFT. <strong>GRPO is not in that table.</strong> The changelog announces <strong>EasyR1</strong> as a separate “efficient, scalable and multi-modality RL training framework for efficient GRPO training.” Treat EasyR1 as a sibling project, not as a LLaMA-Factory table row.</li><li><strong>Unsloth’s README</strong> lists reinforcement learning, LoRA, QLoRA, full fine-tuning, pretraining, RL, <strong>GRPO, DPO</strong> and FP8. The fine-tuning guide describes LoRA versus QLoRA versus full fine-tuning. The RL guide documents <strong>GRPO</strong> (including <code>loss_type</code> values <code>gspo</code>, <code>grpo</code> and <code>dr_grpo</code> in <code>GRPOConfig</code>). A preference page states that <strong>DPO, ORPO, PPO, KTO</strong> “all work with Unsloth” and links Colab notebooks for GRPO, ORPO, DPO, KTO and SimPO.</li></ul>\n<h2>Tool-calling and multi-turn chat data</h2>\n<p>If you are fine-tuning a <strong>tool-use</strong> model, the dataset schema matters as much as the trainer.</p>\n<ul><li><strong>Axolotl</strong> conversation docs use a <code>chat_template</code> dataset type. Older ShareGPT <code>conversations</code> / <code>from</code> / <code>value</code> records can be mapped onto it; newer data typically uses OpenAI-style <code>messages</code> with <code>role</code> / <code>content</code>. Templates may come from the tokenizer, a named template, or a custom Jinja file. A dedicated <strong>“Using tool use”</strong> section documents a top-level <code>tools</code> array (JSON Schema function definitions) and assistant <code>tool_calls</code> plus <code>role: tool</code> turns. The docs warn you to check that the chosen chat template actually supports tools.</li><li><strong>LLaMA-Factory</strong> supports <strong>alpaca</strong> and <strong>sharegpt</strong> formats (<code>data/README.md</code>). Alpaca can carry a multi-turn <code>history</code> list. ShareGPT allows extra roles: the defaults include <code>observation</code> for tool results and <code>function_call</code> for calls, plus an optional <code>tools</code> column. OpenAI-style <code>messages</code> are documented as a special case of ShareGPT. The README’s SFT dataset list includes <strong>Glaive Function Calling V2</strong> and <strong>AgentInstruct</strong>. Features also name “multi-turn dialogue” and “tool using” as tasks.</li><li><strong>Unsloth’s datasets guide</strong> documents raw corpus (continued pretraining), instruct (SFT) and <strong>multi-turn conversation</strong> (SFT), with ShareGPT (<code>from</code>/<code>value</code>) and ChatML/OpenAI (<code>role</code>/<code>content</code>) examples and a <code>standardize_sharegpt</code> helper. The chat-templates page covers Conversational, ChatML, ShareGPT and Alpaca-style formatting in Python. <strong>Tool calling is documented mainly as a runtime capability</strong> (a local-LLM tool-calling guide with OpenAI-style <code>tool_calls</code> loops). The fine-tuning guide mentions tool-calling as a behavior you might train with RL and a reward function. This comparison does not treat that as the same kind of first-class SFT tool schema Axolotl and LLaMA-Factory publish.</li></ul>\n<h2>Hardware and backends</h2>\n<ul><li><strong>Axolotl</strong> requires a NVIDIA GPU (Ampere or newer for bf16 and Flash Attention) or an AMD GPU, Python <strong>&gt;=3.12</strong>, and PyTorch <strong>≥2.13.0</strong>. Multi-GPU is documented with FSDP2 and DeepSpeed; multi-node with Torchrun or Ray.</li><li><strong>LLaMA-Factory</strong> requires Python <strong>&gt;=3.11</strong>. Optional packages include CUDA (minimum 11.6, recommended 12.2), DeepSpeed, bitsandbytes, vLLM and FlashAttention. The README documents Docker flows for CUDA, <strong>AMD ROCm</strong> and <strong>Ascend NPU</strong>, plus a Megatron-core backend via <code>mcore_adapter</code>. Its hardware table is explicitly marked <em>estimated</em>.</li><li><strong>Unsloth</strong> states that it works on Windows, Linux, WSL and macOS, and that it supports multi-GPU setups, NVIDIA, AMD and Intel GPUs, CPUs and the Vulkan backend. Core install uses <code>--torch-backend=auto</code>. An AMD Docker image <code>unsloth/unsloth-rocm</code> is documented. The multi-GPU page says Unsloth can already use Accelerate and DeepSpeed, including <strong>FSDP</strong> and <strong>DDP</strong> (<code>accelerate launch</code> / <code>torchrun</code>), but also that official multi-GPU support is still being announced and the setup is currently manual.</li></ul>\n<h2>Licences and versions (11 November 2026)</h2>\n<p>Checked on PyPI, GitHub latest releases, and each repository’s licence file(s):</p>\n<table><thead><tr><th scope=\"col\">Package</th><th scope=\"col\">Licence file</th><th scope=\"col\">PyPI / GitHub</th><th scope=\"col\">Requires Python</th></tr></thead><tbody><tr><td>axolotl</td><td>Apache License 2.0 (<code>LICENSE</code>)</td><td>0.21.1 / v0.21.1</td><td>&gt;=3.12</td></tr><tr><td>llamafactory</td><td>Apache License 2.0 (<code>LICENSE</code>)</td><td>0.9.5 / v0.9.5</td><td>&gt;=3.11</td></tr><tr><td>unsloth</td><td>Apache License 2.0 (<code>LICENSE</code>) for the core package; AGPL-3.0 (<code>studio/LICENSE.AGPL-3.0</code>) for optional Studio UI</td><td>PyPI 2026.11.3 (GitHub latest release tag v0.1.916-beta, same calendar day)</td><td>&gt;=3.9,&lt;3.15</td></tr></tbody></table>\n<p>Axolotl’s PyPI metadata does not set a licence classifier; the Apache-2.0 text is from the repo <code>LICENSE</code>. Unsloth’s PyPI <code>license_expression</code> is Apache-2.0, which matches the core package, not the Studio UI. The Unsloth README states this dual-licensing model explicitly. Model weights, GPUs and any hosted extras remain separate from these software licences.</p>\n<p>When linking the LLaMA-Factory repository, use <a href=\"https://github.com/hiyouga/LlamaFactory\">hiyouga/LlamaFactory</a>, the canonical path. The hyphenated <code>hiyouga/LLaMA-Factory</code> path redirects to it, so don&#39;t use that in published links.</p>\n<h2>Other options</h2>\n<p>The table above stays a three-way comparison of <a href=\"/entries/axolotl/\">Axolotl</a>, <a href=\"/entries/llama-factory/\">LLaMA-Factory</a> and <a href=\"/entries/unsloth/\">Unsloth</a>. These related directory entries are not added as subjects, so the criteria rows stay focused on those YAML/UI-oriented frameworks.</p>\n<ul><li><strong><a href=\"/entries/trl/\">TRL</a></strong> (PyPI and GitHub latest 1.17.1, Apache-2.0, Python &gt;=3.11) is a Transformers-based trainer library. The README documents <code>SFTTrainer</code>, <code>GRPOTrainer</code>, <code>DPOTrainer</code>, <code>KTOTrainer</code> and <code>RewardTrainer</code>, a CLI (<code>trl sft</code>, <code>trl dpo</code>, <code>trl kto</code>), Accelerate DDP, DeepSpeed ZeRO and FSDP, and full PEFT integration for LoRA/QLoRA. Docs: <a href=\"https://huggingface.co/docs/trl/index\">huggingface.co/docs/trl/index</a>.</li><li><strong><a href=\"/entries/peft/\">PEFT</a></strong> (PyPI and GitHub latest 0.21.2, Apache-2.0, Python &gt;=3.10) is the Hugging Face adapter library. The README quickstart uses <code>LoraConfig</code> and <code>get_peft_model</code>. Docs: <a href=\"https://huggingface.co/docs/peft/index\">huggingface.co/docs/peft/index</a>.</li><li>Together they are the core of the recommended <a href=\"/stacks/post-training-tool-use-model/\">post-training stack for a tool-use model</a>.</li><li><strong><a href=\"/entries/ms-swift/\">ms-SWIFT</a></strong> (PyPI and GitHub latest 4.6.0, Apache-2.0, Python &gt;=3.9) is ModelScope&#39;s CLI-first training framework (<code>swift sft</code>, <code>swift rlhf</code>, <code>swift infer</code>, plus <code>megatron sft</code>). Its training-methods table lists pre-training, supervised fine-tuning, GRPO, GKD, PPO, DPO, KTO, reward modelling, CPO, SimPO, ORPO, embedding, reranker and sequence classification, with full-parameter, LoRA and QLoRA columns (and DeepSpeed / multi-machine support). A separate Megatron-SWIFT table and a GRPO-family table (GRPO, DAPO, GSPO, SAPO, CISPO, CHORD, RLOO, Reinforce++) are also documented. Docs: <a href=\"https://swift.readthedocs.io/en/latest/\">swift.readthedocs.io/en/latest/</a>.</li><li><strong><a href=\"/entries/torchtune/\">torchtune</a></strong> is <strong>deprecated</strong>. Its README states that it is no longer actively maintained and that development wound down in 2025, pointing at GitHub issue <a href=\"https://github.com/meta-pytorch/torchtune/issues/2883\">#2883</a> (&quot;The future of torchtune&quot;), which was still open on 12 November 2026. PyPI remains at 0.6.1 (BSD-3-Clause, uploaded 7 April 2025). The repository is not archived. Do not start a new training stack with it. Docs: <a href=\"https://meta-pytorch.org/torchtune/main/\">meta-pytorch.org/torchtune/main/</a>.</li></ul>\n<h2>What we ran, and what we did not</h2>\n<p>We did <strong>not</strong> install these packages or run CLI help against a live install. A useful smoke test (<code>axolotl config-schema</code>, <code>llamafactory-cli help</code>, or importing <code>FastLanguageModel</code>) would pull <strong>PyTorch</strong> and related CUDA/ROCm wheels, which is a large download and is not GPU-free in practice. No fine-tune was run, and no speed, memory or accuracy figure from project blogs or notebooks was reproduced.</p>\n<h2>A safe selection sequence</h2>\n<ol><li><strong>Name the layer.</strong> If you need a multi-turn agent RL <em>stack</em> (rollouts, rewards, a training backend), start from <a href=\"/compare/agent-reinforcement-learning-stacks/\">Agent RL stacks compared</a>. If you want the Hugging Face trainer layer (TRL and PEFT) and a documented scale-out path, use <a href=\"/stacks/post-training-tool-use-model/\">Post-training a tool-use model</a>. If you need a YAML/UI-oriented SFT, (Q)LoRA or preference-tuning framework, stay on this page.</li><li><strong>List the methods you actually need.</strong> If you need GRPO in the same project as SFT, Axolotl and Unsloth document it; LLaMA-Factory’s official approaches table does not.</li><li><strong>Check the dataset schema.</strong> Tool-call SFT is explicitly specified in Axolotl’s conversation docs and LLaMA-Factory’s ShareGPT format. Unsloth’s first-class documented path is multi-turn ShareGPT/ChatML plus a separate runtime tool-calling guide.</li><li><strong>Match hardware and licence.</strong> Note Unsloth’s AGPL-3.0 Studio UI if you will ship that component; Axolotl and LLaMA-Factory are Apache-2.0. Confirm CUDA versus ROCm versus NPU install docs before you pin a stack.</li><li><strong>Pin versions.</strong> Record the PyPI versions above (or newer pins), the YAML or Python entry point, and any engine flags (DeepSpeed, FSDP, <code>loss_type</code> for GRPO).</li></ol>"
}
