Torchtune

PyTorch-native post-training, hackable recipes
Fine-tuningFine-tuning libraryBSD-3-ClauseRuns locallyPythonIntermediate
OSAI Pulse ⓘ ★★★★★★★★★★ /100 signals tracked
🐳 Docker pulls 📦 PyPI downloads / month 📦 npm downloads / month 🚀 Latest release ·
Visit website →View on GitHub

What is Torchtune?

Torchtune is the official PyTorch library for fine-tuning LLMs: readable single-file recipes for LoRA, QLoRA and full fine-tuning, from single GPU to multi-node.

Why people choose Torchtune

Torchtune at a glance

CategoryFine-tuning
TypeFine-tuning library
LicenseBSD-3-Clause
Runs locallyYes
Built withPython
Skill levelIntermediate
Best forPyTorch users who want clean, hackable recipes

Open-source alternatives to Torchtune

Other open-source fine-tuning tools worth comparing:

UnslothFine-tune LLMs 2x faster on one GPUAxolotlConfig-driven fine-tuning for many modelsLLaMA-FactoryFine-tune 100+ models with a UIPEFTLoRA and friends from Hugging FaceTRLAlign LLMs (SFT, DPO, PPO)Llama CookbookOfficial recipes to fine-tune Llamams-swiftFine-tune 500+ LLMs and VLMs

Torchtune head-to-head

Torchtune vs UnslothTorchtune vs AxolotlTorchtune vs LLaMA-FactoryTorchtune vs PEFTTorchtune vs TRLTorchtune vs Llama CookbookTorchtune vs ms-swift

FAQ

Is Torchtune free?

Torchtune is free and open-source (BSD-3-Clause license), so you can use, self-host and modify it at no cost.

Can I run Torchtune locally?

Yes. Torchtune is designed to run on your own machine or server, keeping your data private.

What is the best alternative to Torchtune?

Popular open-source alternatives include Unsloth, Axolotl, LLaMA-Factory. See the comparisons above to choose.

Explore more open-source AI

Browse the full directory of open-source AI tools, models and projects — updated daily.

Browse all tools →