peft vs deepspeed
Two of the top projects in Training and fine-tuning, side by side: who leads on each score part and who each one suits, then setup, license, activity and what each review found.
peft
Python library for LoRA and other parameter-efficient fine-tuning methods
deepspeed
PyTorch library for distributed training of very large models with ZeRO
Verdict
peft ranks higher, 91 to 88. Of the 4 score parts we measure for both, peft leads on 2, deepspeed on 1 and 1 is even.
- Adoptiondeepspeed leads by 5 points, 95 to 90.
- FreshnessEven at 100.
- Maintenancepeft leads by 6 points, 88 to 82.
- Agent-readypeft leads by 25 points, 70 to 45: a wide gap.
Pick peft if you are
ML engineers fine-tuning large models on limited GPU memory
- Adapter checkpoints are a few MB instead of GBs, per the T0_3B and Stable Diffusion examples
- LoRA trains bigscience/mt0-xxl (12B) in 56GB GPU where full fine-tuning runs out of memory
Pick deepspeed if you are
ML engineers training or fine-tuning large PyTorch models on multi-GPU clusters
- Used to train models such as BLOOM 176B and Megatron-Turing NLG 530B
- Integrates with Hugging Face Transformers and Accelerate, Lightning, Composer and Determined
| What we compare | peft | deepspeed |
|---|---|---|
| Score parts, out of 100 | ||
| Adoption | 90, widely used | 95, widely used |
| Freshness | 100, active | 100, active |
| Maintenance | 88, healthy | 82, healthy |
| Agent-ready | 70, partly | 45, minimal |
| Facts from GitHub and the README | ||
| Stars | 21.9k | 43.4k |
| License | Apache-2.0 (permissive) | Apache-2.0 (permissive) |
| Last commit | Nov 2026 | Nov 2026 |
| Last release | Nov 2026 | Nov 2026 |
| Language | Python | Python |
| Docker | Yes | No |
| GPU | Optional | Optional |
| arm64 or Apple Silicon | Mentioned | Not stated |
peft
PEFT wraps a pretrained model with adapter methods such as LoRA, soft prompts and IA3 through get_peft_model, so only a small set of extra parameters is trained. Adapters are saved as small checkpoints (19MB versus 11GB for T0_3B in the README) and reloaded with PeftModel.from_pretrained. It integrates with Transformers, Diffusers, Accelerate and TRL, and combines with quantization for QLoRA-style training.
Who it is for: ML engineers fine-tuning large models on limited GPU memory
Strengths
- Adapter checkpoints are a few MB instead of GBs, per the T0_3B and Stable Diffusion examples
- LoRA trains bigscience/mt0-xxl (12B) in 56GB GPU where full fine-tuning runs out of memory
- Integrates with Transformers, Diffusers, Accelerate and TRL; installs with pip
- Combines with quantization, e.g. QLoRA on Llama-2-7b with a 16GB GPU
Weaknesses
- Library only: no training UI, you write the loop or use Trainer or TRL
- Transformers integration lacks some PEFT features, such as merging adapters into the base model
- Models not officially supported need manual target-module configuration
- lora-t0-3b scored 0.863 versus 0.892 for Flan-T5 in the README's RAFT table
- GPU optional
- Docker
- Needs PyTorch, Transformers
- Models: LoRA, Soft prompts, IA3, Transformers models, Stable Diffusion
deepspeed
DeepSpeed is a PyTorch library that makes large-model training fit and scale across GPUs using ZeRO, ZeRO-Infinity offload, 3D parallelism, Ulysses sequence parallelism and DeepSpeed-MoE. It is configured through a JSON file and integrates with Hugging Face Transformers, Accelerate, Lightning, MosaicML Composer, Determined and MMEngine. C++/CUDA ops are built just-in-time with ninja by default.
Who it is for: ML engineers training or fine-tuning large PyTorch models on multi-GPU clusters
Strengths
- Used to train models such as BLOOM 176B and Megatron-Turing NLG 530B
- Integrates with Hugging Face Transformers and Accelerate, Lightning, Composer and Determined
- Supports NVIDIA, AMD, Intel Gaudi and XPU, Huawei Ascend NPU and CPU accelerators
- Installs with pip install deepspeed; ds_report checks which ops are compatible
Weaknesses
- PyTorch must be installed first, and a CUDA or ROCm compiler is needed for JIT ops
- Windows lacks async IO and GDS support
- Tested mainly on NVIDIA Pascal to Hopper and AMD MI100/MI200; other hardware is less validated
- Training-focused; tuning requires understanding the JSON config and ZeRO stages
- GPU optional
- Needs PyTorch, CUDA or ROCm compiler (nvcc/hipcc), ninja
- Models: PyTorch models, Hugging Face Transformers
More in Training and fine-tuning
Building with these?
We help teams pick an open-source AI stack and run it in production. Client work never changes a rank.
AI app development →Send a project brief (opens in a new tab)