peft vs torchtune
Parameter-efficient adaptation and LLM post-training compared
peft and torchtune are Python projects for adapting pretrained models, with different scopes. peft focuses on training and managing small sets of additional parameters, while torchtune provides editable PyTorch recipes for broader LLM post-training workflows.

peft: Fine-Tune Models with Fewer Trainable Parameters
Hugging Face PEFT adapts pretrained models by training a small set of additional parameters instead of updating the full model. It is for practitioners who want to reduce fine-tuning compute and storage costs across supported model workflows.

torchtune: Fine-Tune and Post-Train Large Language Models
torchtune is a PyTorch library for configuring and running LLM post-training workflows, from supervised fine-tuning to preference optimization. It is aimed at developers who want editable recipes and model-specific configs, but is no longer actively maintained.
| peft | torchtune | |
|---|---|---|
| Language | Python | Python |
| License | Apache-2.0 | BSD-3-Clause |
| Stars | 21.8k | 5.8k |
| Forks | 2.5k | 756 |
| Last analyzed | Oct 3, 2026 | Oct 3, 2026 |
Key differences
- peft supports adaptation workflows for LLMs, diffusion models, and other supported architectures; torchtune focuses on large language models.
- peft provides methods such as LoRA and prompt-based approaches and saves adapters separately from the base model; torchtune offers recipes spanning supervised fine-tuning, distillation, preference optimization, reinforcement learning, and quantization-aware training.
- peft integrates with Hugging Face libraries and is an adaptation library rather than a complete training pipeline; torchtune packages PyTorch implementations, recipes, and editable YAML configurations.
- peft is licensed under Apache-2.0; torchtune is licensed under BSD-3-Clause.
- peft is not archived; torchtune’s development wound down in 2025 and it is no longer actively maintained.
Choose peft if you…
- need parameter-efficient adaptation methods for supported models, including diffusion workflows.
- want to save or switch task-specific adapters separately from a base model in compatible workflows.
- use Hugging Face libraries and need an adaptation library rather than a full training pipeline.
Choose torchtune if you…
- want editable PyTorch recipes and model-specific configurations for LLM post-training.
- need to explore workflows such as DPO, PPO, GRPO, or knowledge distillation.
- are maintaining or studying existing torchtune workflows and can account for limited upstream support.
This comparison is generated with AI from the OSRepos analyses of both projects. Always check each project's repository and documentation before choosing.