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.

pefttorchtune
LanguagePythonPython
LicenseApache-2.0BSD-3-Clause
Stars21.8k5.8k
Forks2.5k756
Last analyzedOct 3, 2026Oct 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.
Read the peft analysis →

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.
Read the torchtune analysis →

This comparison is generated with AI from the OSRepos analyses of both projects. Always check each project's repository and documentation before choosing.

OS
OSRepos

Analysis and discovery of open source repositories. Find interesting projects and follow their updates.

Monitor your website with YourWebsiteScore

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of third-party repository code is at your own risk. Always review source code, dependencies, licenses, and security implications before running anything.

© 2025 OSRepos. Built with Nuxt 3 and lots of ❤️