Fine-tuning tools in practice: Unsloth, Axolotl, torchtune and TRL
What each popular fine-tuning library is built for, the same QLoRA job expressed in each, how to choose (single GPU versus multi-GPU, code versus config, export to GGUF), and the checks that catch the usual mistakes: chat templates, loss masking, packing and evaluation.
By Sandip Maity, Applied AI Engineer
The LoRA lab builds a fine-tune with Hugging Face PEFT and TRL so you can see every step. In practice most people use a higher-level tool that wraps the same ideas with faster kernels, ready-made recipes or a configuration file. This lesson explains what each popular tool is for and shows the same job in each.
What we checked. The configuration and code snippets below show each tool's documented interface as of November 2026. We have not run them on GPU hardware for this lesson; option names change between releases, so start from each project's current example for your model. The memory and data checks in this lesson apply whatever tool you use.
#The tools
| Tool | Style | Best at | Watch out for |
|---|---|---|---|
| TRL + PEFT (Hugging Face) | Python library | Flexibility; every training method (SFT, DPO, GRPO and more); the base the others build on | You write and maintain the training script |
| Unsloth | Python library with its own fast kernels | Fast, low-memory LoRA and QLoRA on one GPU; notebooks; export to GGUF | Supports specific model architectures; check yours is listed |
| Axolotl | YAML configuration over Transformers, TRL and PEFT | Reproducible runs, many dataset formats, multi-GPU with FSDP or DeepSpeed, packing | Many options; read the defaults |
| torchtune | PyTorch-native recipes with YAML configs | Readable, hackable training loops without the Transformers stack | Smaller model and method coverage; check the project's current status |
| LLaMA-Factory and others | Configuration and web UI | Trying many methods quickly | Same checks apply |
Open-source training tools change quickly. Check that the one you pick is actively maintained and supports your model before committing to it.
Pro content
Keep reading with Inference Academy Pro
Unlock the rest of this lesson, plus every advanced lesson, hands-on lab, the larger playground models and completion certificates.
Still to come in this lesson
- The same QLoRA job, three ways
- Choosing
- Checks that matter in every tool
- Exporting for local runtimes
- Exercises
You will be able to answer
- You have one consumer GPU and want the fastest, lowest-memory LoRA or QLoRA run on a supported model. Which tool is built for that?
- Your team wants every training run described in a versioned YAML file and runs on several GPUs. Which tool fits best?
- Which check matters whatever library you use?
- What does sample packing do?
- Why should you evaluate a fine-tune with the same runtime and quantisation you will serve with?