torchtune
A native-PyTorch library for LLM fine-tuning
Decision gist · record as of 2026-08-14
Yes. torchtune is actively maintained (latest release April 2025), has no known vulnerabilities, low install friction, and a permissive BSD license. It is purpose-built for LLM fine-tuning with broad recipe coverage and model support. Install if you need to fine-tune or post-train language models; skip if you only need inference or work exclusively with models outside its supported set.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >=3.9 and PyTorch with CUDA support for GPU training; model weights must be downloaded from huggingface_hub or kagglehub.
- Low install friction; pure Python wheel with 14 runtime dependencies including PyTorch ecosystem packages and tokenization libraries.
- Active maintenance with latest release in April 2025 and 5797 GitHub stars.
License · maintenance · safety
permissive license (permissive) — BSD 3-Clause permissive license allows commercial and private use with attribution and liability disclaimer; no restrictions on derivative works or redistribution.
last release 2025-04-07 (494 days) · last repo commit 2026-08-14 · 5,797 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 329,013 downloads/mo, #7,548 on PyPI
Alternatives
Verify before relying
pip install torchtune
from torchtune.models.llama3_2 import llama3_2
# Configure and run a training recipe via CLI:
# tune run lora_finetune_single_device --config llama3_2/3B_lora_single_device- Whether all 14 runtime dependencies are required for basic usage or if subsets suffice for specific recipes.
- Specific hardware requirements or CUDA version constraints not documented in the fact sheet.
- Production-readiness and performance characteristics of multi-node training beyond the February 2025 announcement.
What it is and what it does
torchtune is a native-PyTorch library that provides end-to-end support for fine-tuning and post-training large language models. It bundles PyTorch implementations of popular models (Llama, Gemma, Mistral, Phi, Qwen) with YAML-configurable training recipes covering the full post-training lifecycle: supervised fine-tuning, knowledge distillation, reinforcement learning methods (DPO, PPO, GRPO), and quantization-aware training. It supports single-device, multi-device, and multi-node training with various weight-update strategies including full fine-tuning and LoRA/QLoRA.
The library targets researchers and practitioners who need to adapt pre-trained models to specific tasks or domains. It abstracts away low-level PyTorch complexity while exposing configuration through YAML, allowing users to experiment with different training methods and model sizes without rewriting training loops. Dependencies include data-loading libraries (torchdata, datasets, huggingface_hub), tokenizers (sentencepiece, tiktoken, tokenizers), and utility packages (omegaconf, psutil, Pillow) to support model loading, preprocessing, and monitoring.
Use it for
- Fine-tune models on custom datasets using LoRA to reduce memory requirements on a single GPU.
- Perform knowledge distillation to compress a large teacher model into a smaller student model using LoRA on distributed hardware.
- Apply DPO to align model outputs with human preferences using multi-device training.
- Run quantization-aware training on distributed nodes to produce efficient inference-ready models.
- Experiment with different post-training methods via config swaps without rewriting training code.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
torchtune is actively maintained (latest release April 2025), has no known vulnerabilities, low install friction, and a permissive BSD license. It is purpose-built for LLM fine-tuning with broad recipe coverage and model support. Install if you need to fine-tune or post-train language models; skip if you only need inference or work exclusively with models outside its supported set.
Install
torchtune on PyPI
Before you install
Low install friction; pure Python wheel with 14 runtime dependencies including PyTorch ecosystem packages and tokenization libraries. Active maintenance with latest release in April 2025 and 5797 GitHub stars.
Requires Python >=3.9 and PyTorch with CUDA support for GPU training; model weights must be downloaded from huggingface_hub or kagglehub.
License in practice
BSD 3-Clause permissive license allows commercial and private use with attribution and liability disclaimer; no restrictions on derivative works or redistribution.
Quickstart
pip install torchtune
from torchtune.models.llama3_2 import llama3_2
# Configure and run a training recipe via CLI:
# tune run lora_finetune_single_device --config llama3_2/3B_lora_single_device
Verify before relying
- Whether all 14 runtime dependencies are required for basic usage or if subsets suffice for specific recipes.
- Specific hardware requirements or CUDA version constraints not documented in the fact sheet.
- Production-readiness and performance characteristics of multi-node training beyond the February 2025 announcement.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 14 packagestorchdatadatasetshuggingface_hubsafetensorskagglehubsentencepiecetiktokenblobfiletokenizersnumpytqdmomegaconfpsutilPillow |
| Maintenance | Actively maintained 494 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 329,013 / month, #7,548 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: torchtune-0.6.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “llm fine-tuning pytorch”
- torchtunetorchtune is a PyTorch library for fine-tuning, post-training, and…
- unslothUnsloth accelerates training and fine-tuning of large language models…
- loralibloralib provides PyTorch modules that implement Low-Rank Adaptation…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also torchtitan · tinker_cookbook · torchao · unsloth-zoo · lightning · trl · speechbrain · torchtext · trainer · torchaudio