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: 2-4× faster and lower memory than vanilla HF on consumer GPUs.
TRL
Hugging Face's native trainer library for SFT, DPO, PPO, GRPO: 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.
Each fine-tuning framework optimises one axis: Axolotl for YAML reproducibility, Unsloth for single-GPU speed, TRL for preference tuning, LLaMA-Factory for accessibility, PEFT for control, torchtune 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. 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.
This question looks like trivia, but it is really a test of whether you reason about tooling along axes instead of memorising brand names. 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 fundamentally cannot. The differences live in defaults, ergonomics, speed, and how much control they hand you.
The reason interviewers ask it is that the answer reveals whether you have actually shipped fine-tuning work. Someone who has only read blog posts names whichever tool trended last. Someone who has run training jobs maps each tool 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 the matching question has clean answers at all.
This deep dive walks each framework, the axis it owns, where it breaks down, and how teams actually combine them. It ends with a short ordered decision procedure you can recite in an interview, so the matching exercise becomes a reasoning exercise rather than a feat of recall.
The convenience versus control spectrum
Order the six tools 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, declarative YAML that 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.
The key insight is that 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 essentially 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 |
Real products, models, and research that use this idea.
- Many 2026 open-weight releases ship an Axolotl YAML alongside the model so the community can reproduce the SFT and DPO runs exactly.
- Unsloth is widely used in Kaggle and Colab notebooks to QLoRA-fine-tune Llama 4 and Qwen 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 two to four 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.