Match fine-tuning framework to its strongest fit
Drag each answer to line up with its matching prompt
Axolotl
Maximum control with the most boilerplate: for novel research setups that don't fit the conventions of higher level frameworks.
Unsloth
Speed optimised single GPU LoRA / QLoRA with custom Triton kernels: about 2× faster and much lower memory than vanilla HF on consumer GPUs.
TRL
Hugging Face's native trainer library for SFT, DPO, GRPO and (experimental) PPO: tightly integrated with the transformers + accelerate stack.
LLaMA-Factory
GUI first interface plus YAML, supports a broad menu of methods including chat template wizards: friendly for non-specialists.
Raw transformers + PEFT
YAML driven config covering many methods (SFT, DPO, LoRA, full FT): strong default for production style training where reproducibility matters.
torchtune
PyTorch's native FT framework with first party FSDP integration: clean PyTorch idioms, less reliant on the HF abstractions (no longer actively developed since July 2025).
Each framework optimises one axis: Axolotl for YAML reproducibility, Unsloth for single-GPU speed, TRL for HF fit, LLaMA-Factory for accessibility, PEFT for control, torchtune (now unmaintained) for PyTorch idioms.
Think of fine-tuning frameworks like ways to cook the same dish. Axolotl is a precise recipe card you fill in, so anyone can reproduce the meal exactly. Unsloth is a turbo stove that cooks the same thing twice as fast on a small burner. TRL is the official cookware that fits your existing kitchen perfectly. LLaMA-Factory is a friendly app with buttons, so beginners do not need recipes. Raw tools give you a bare kitchen with no shortcuts but total freedom. torchtune is cookware made by the people who built the kitchen itself, though they stopped improving it in 2025. Same dish, different priorities: speed, ease, control, or repeatability.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Fine-tuning tools are best compared along axes, not by brand name. All six frameworks wrap the same underlying training loop: load a base model, apply a method like SFT or DPO or LoRA, run gradient descent, save the result. None of them can do something the others cannot. The differences live in defaults, ergonomics, speed, and how much control they hand you.
Each tool maps to the constraint it solves: a single GPU, a reproducible team pipeline, an existing Hugging Face codebase, a non-technical user, a novel research setup, or a PyTorch-native stack.
The cleanest mental model is a spectrum from convenience to control. On the convenience end sit GUI-first and YAML-first tools that get you training in minutes. On the control end sits raw code that you assemble yourself. Speed is a separate axis layered on top, ecosystem fit is a third, and scaling behaviour across many GPUs is a fourth. A given tool can be strong on one axis and merely adequate on the rest, which is why each tool maps cleanly to one axis.
The convenience versus control spectrum
The six tools can be ordered by how much you write versus how much is decided for you. LLaMA-Factory sits at the convenience extreme: a graphical interface and chat template wizards mean you can fine-tune without writing training code at all. Axolotl is next. Its declarative YAML captures the whole run in one auditable file.
TRL and torchtune sit in the middle. Both give you a Python API with sensible defaults, but you still write and structure code. TRL leans on the Hugging Face abstractions; torchtune leans on plain PyTorch idioms. The distinction is which ecosystem owns the conventions you inherit, not a difference in what the loop can express.
Raw transformers plus PEFT sits at the control extreme. You wire the data collator, training loop, and PEFT config yourself. The payoff is total freedom for setups that break framework conventions; the cost is boilerplate and more places to introduce bugs.
Moving toward control buys flexibility but rarely buys quality on a standard run. A LoRA fine-tune of a Llama 3.1 8B comes out the same whether you launch it from a LLaMA-Factory form, an Axolotl YAML, or a hundred lines of raw PyTorch. So the rational default is the most convenient tool that can express your setup, escalating toward control only when a constraint forces it.
Situations where this technique stops working.
2–4 min · Everything important, quickly.
| Framework | Optimises for | Best when |
|---|---|---|
| Axolotl | Reproducibility (YAML config) | Production team needs auditable, repeatable multi-method runs |
| Unsloth | Single-GPU speed and memory | One consumer GPU, fast LoRA or QLoRA iteration |
| TRL | Hugging Face ecosystem fit | Code already lives in transformers; want SFT, DPO, GRPO |
| LLaMA-Factory | Accessibility (GUI + wizards) | Non-specialists fine-tune without writing code |
| Raw transformers + PEFT | Maximum control | Novel research setups outside framework conventions |
| torchtune | PyTorch-native idioms + FSDP | Want clean PyTorch and to avoid HF abstractions (no longer actively developed) |
Real products, models, and research that use this idea.
- Many community fine-tunes on the Hugging Face Hub publish their Axolotl YAML on the model card so others can reproduce the SFT and DPO runs.
- Unsloth is widely used in Kaggle and Colab notebooks to QLoRA-fine-tune Llama 3.1 8B and small Qwen3.5 variants on a single consumer GPU.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow does Unsloth actually achieve its roughly two times speedup over vanilla Hugging Face training?
Talk about hand-written Triton kernels, fused operations, manual autograd for attention and MLP, and avoiding redundant memory copies, rather than any algorithmic change to LoRA itself.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Picking a framework by popularity instead of by axis. The right question is what you optimise for: speed, reproducibility, control, or ease, not which name trended last month.
60 second bullets to scan on the way to the call.
The defining axis each framework optimises for
Why these tools mostly overlap in achievable quality
Primary sources. Browse if you want the original framing.
Same topic, related formats. Practice these next.