Lattice
Skip to content
← Comparisons

Unsloth vs Axolotl vs TRL vs LLaMA-Factory

These four all train open models, but they ask you to own different parts of the loop. The decision is less about which produces a better model than about which leaves you with a process you can repeat.

Short answer

Start with Unsloth if you are one person on one GPU: the memory and speed gains are real and the loop stays short enough to understand.

By Kunj Shah · Licence and cost facts verified · method

Unsloth vs Axolotl vs TRL vs LLaMA-Factory compared across 6 dimensions
DimensionUnslothAxolotlTRLLLaMA-Factory
Memory footprintLowest: 2x faster, ~60% less VRAMModerate, depends on backendBaseline, framework overheadModerate, wraps TRL and PEFT
Methods supportedSFT, DPO, GRPO, ORPOSFT, DPO, PPO, ORPO, KTOSFT, DPO, PPO, GRPO, KTOSFT, DPO, PPO, ORPO, KTO, RLHF
ConfigurationPython code, explicitYAML config, minimal codePython code, full controlYAML or Web UI
Architecture coverageLlama, Mistral, Qwen, Gemma and friendsVery broad, via transformersAnything transformers supportsVery broad, via transformers
Best forOne person, one GPU, fast iterationTeams wanting reproducible YAML runsResearchers needing custom training loopsTeams wanting a UI and many methods
Where it losesNarrower architecture list than AxolotlLess kernel-level speed than UnslothYou write and maintain the loopHeavier stack, more moving parts

Scroll the table sideways to see every tool.

What this table is not. These are editorial judgements, not benchmarks: Lattice has not run these tools head to head, and no cell uses GitHub stars or vendor benchmark claims as evidence. Licence and cost facts are re-checked on a schedule the build enforces: the receipt is public.

The recommendation

Which should you choose: Unsloth, Axolotl, TRL or LLaMA-Factory?

Start with Unsloth if you are one person on one GPU: the memory and speed gains are real and the loop stays short enough to understand. Move to Axolotl or LLaMA-Factory when runs need to be reproducible across a team, because YAML config beats a notebook. Reach for TRL directly when you need a method the wrappers have not exposed yet, or a custom loss, and accept that you now own the training loop.

Rules of thumb

  • Fine-tuning teaches behaviour, not facts. If the answer changes monthly, it belongs in retrieval.
  • Measure on your own eval set before and after. A lower loss is not a better model.
  • A fine-tuned model is a new artefact you have to serve and retrain. Budget for that before you start.

Quick answers

When should you use Unsloth, and when should you skip it?
Use Unsloth when: LoRA fine-tuning on a single GPU, with memory and time roughly halved. Skip it when: you need a training stack you can audit line by line.
When should you use Axolotl, and when should you skip it?
Use Axolotl when: configuration-driven fine-tuning across many architectures. Skip it when: you need to hand-tune the training loop itself.
When should you use TRL, and when should you skip it?
Use TRL when: post-training trainers for SFT, DPO and GRPO on top of any PEFT setup. Skip it when: you are training from scratch rather than aligning an existing model.
When should you use LLaMA-Factory, and when should you skip it?
Use LLaMA-Factory when: one interface for SFT, DPO and RLHF across open models. Skip it when: you want a minimal, readable training script.