Unsloth
Unsloth is a self-hosted library in the Fine-tuning & Training layer of the AI stack. Hand-written kernels that cut LoRA memory and time sharply.
By Kunj ShahFacts verifiedmethod
- Licence
- Apache-2.0
- Language
- Python
- Cost
- free
Use Unsloth when
LoRA fine-tuning on a single GPU, with memory and time roughly halved.
Skip Unsloth when
You need a training stack you can audit line by line.
Produces the weights that layer 1 serves. See every training tool.
Badge this entry
[](https://lattice.kunjshah.in/fine-tuning/unsloth)Rules of thumb
- Fine-tuning teaches behaviour, not facts. If the answer changes monthly, it belongs in retrieval instead.
- Exhaust prompting and retrieval before training. A fine-tune is a model you now have to version, evaluate and serve.
- Hold out an eval set before the first training run. Without it you cannot tell a better model from a different one.
Quick answers
- Is Unsloth open source?
- Yes. Unsloth is open source under the Apache-2.0 licence. It is free to use.
- What are the alternatives to Unsloth?
- The closest alternatives to Unsloth are Axolotl and PEFT.
Ask an AI about this page
Opens the assistant with this page’s link and a question already filled in.
Compared in
- Retrieval vs fine-tuning vs prompt optimisation: fixing wrong answersThree layers that each claim to fix wrong answers, compared on what they actually change, what they need from you, and which failure each one is for.
- Unsloth vs Axolotl vs TRL vs LLaMA-FactoryFine-tuning frameworks compared on memory footprint, supported methods, configuration style and how much of the training loop you own: with a recommendation by team shape.
Reading on training
Alternatives to Unsloth
Listed as an alternative to
- AxolotlAxolotlConfiguration-driven fine-tuning across common architectures.Apache-2.0 · self-hosted · free
Use when Configuration-driven fine-tuning across many architectures.
Skip when You need to hand-tune the training loop itself.
- PEFTPEFTParameter-efficient fine-tuning methods such as LoRA and QLoRA.BSD-3-Clause · self-hosted · free
Use when Parameter-efficient fine-tuning, LoRA and variants, on limited hardware.
Skip when You need to change the model's capabilities, not bolt on an adapter.
Also in training
- AxolotlAxolotlConfiguration-driven fine-tuning across common architectures.Apache-2.0 · self-hosted · free
Use when Configuration-driven fine-tuning across many architectures.
Skip when You need to hand-tune the training loop itself.
- LLaMA-FactoryLLaMA-FactoryUnified interface for SFT, DPO and RLHF on open models.Apache-2.0 · self-hosted · free
Use when One interface for SFT, DPO and RLHF across open models.
Skip when You want a minimal, readable training script.
- PEFTPEFTParameter-efficient fine-tuning methods such as LoRA and QLoRA.BSD-3-Clause · self-hosted · free
Use when Parameter-efficient fine-tuning, LoRA and variants, on limited hardware.
Skip when You need to change the model's capabilities, not bolt on an adapter.
- TRLTRLHugging Face library of post-training trainers for SFT, DPO and GRPO.Apache-2.0 · self-hosted · free
Use when Post-training trainers for SFT, DPO and GRPO on top of any PEFT setup.
Skip when You are training from scratch rather than aligning an existing model.
- DeepSpeedDeepSpeedZeRO sharding and pipeline parallelism for large-scale training.MIT · self-hosted · free
Use when ZeRO sharding and pipeline parallelism across many GPUs.
Skip when The model fits on one device: the complexity buys nothing.
- Megatron-LMMegatron-LMTensor and pipeline parallel training for multi-GPU clusters.Apache-2.0 · self-hosted · free
Use when Tensor and pipeline parallel pretraining at cluster scale.
Skip when You are fine-tuning rather than pretraining.
- torchtunetorchtunePyTorch-native recipes for fine-tuning and aligning open models.BSD-3-Clause · self-hosted · free
Use when PyTorch-native recipes that you can read and modify.
Skip when You want the breadth of a config-driven stack.
- Hugging Face TRLHugging Face TRLPreference and reward optimisation on top of any PEFT setup.proprietary · saas · usage-based
Use when Preference and reward optimisation hosted, without a cluster.
Skip when Training data cannot be uploaded to a third party.
- ColabColabHosted GPUs for small runs and quick experiments.proprietary · saas · free-tier
Use when A disposable GPU for a quick experiment, with no setup.
Skip when Anything reproducible: a notebook is not a training pipeline.
- ReplicateReplicateHosted fine-tuning and deployment for open models.proprietary · saas · usage-based
Use when Hosted fine-tuning and deployment of an open model, billed per run.
Skip when You need custom training code or strict residency.
- Weights & Biases LaunchWeights & Biases LaunchManaged training runs with sweeps and artifact tracking.proprietary · saas · subscription
Use when Managed training runs with sweeps and artifact tracking wired up.
Skip when You want training infrastructure you run yourself.