# What changed in peft

> 18 changes in peft 0.21 from its official release notes, upgrade guides and advisories: 6 breaking, 2 new APIs and options. Each one cited. Sources checked 2026-10-24. HTML: https://unstale.sh/pypi/peft/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## peft 0.21

### Breaking changes

- PEFT requires Transformers ≥ 5.17.0 to work with Tensor Parallel. (0.21.1) — [release notes](https://github.com/huggingface/peft/releases/tag/v0.21.1)
- Hot-swapping adapters is refused while they are merged into the base weights. (0.21.0) — [release notes](https://github.com/huggingface/peft/releases/tag/v0.21.0)
- Adding or loading a second adaption prompt adapter no longer automatically activates it, matching the behavior of other PEFT methods. (0.21.0) — [release notes](https://github.com/huggingface/peft/releases/tag/v0.21.0)
- Adding a second adapter that targets non-existing layers now raises an error instead of silently creating an adapter that adapts nothing. Catch peft.PeftError to suppress potential errors. (0.21.0) — [release notes](https://github.com/huggingface/peft/releases/tag/v0.21.0)
- Deleting an adapter that is merged now raises an error because deletion would not remove its effect. (0.21.0) — [release notes](https://github.com/huggingface/peft/releases/tag/v0.21.0)
- Direct injection now rejects PEFT methods with shared state that would live on a parent model, such as VeRA, because no such parent model exists. (0.21.0) — [release notes](https://github.com/huggingface/peft/releases/tag/v0.21.0)

### New APIs and options

- Prompt learning methods now allow deleting an adapter. (0.21.0) — [release notes](https://github.com/huggingface/peft/releases/tag/v0.21.0)
- A new LoRA-specific optimizer applies Riemannian pre-conditioning to gradients to improve feature learning and avoid separately tuning learning rates for LoRA's A and B matrices. (0.21.0) — [release notes](https://github.com/huggingface/peft/releases/tag/v0.21.0)

### Performance

- For the common case of one active adapter, weight and MoE LoRA delta computation is folded into a single baddbmm operation for speed, with slight numerical differences expected. (0.21.0) — [release notes](https://github.com/huggingface/peft/releases/tag/v0.21.0)
- A delta-based forward pass reduces memory footprint by 22% and training time by 46% on the MetaMathQA benchmark while keeping task accuracy and forgetting stable; slight numerical differences are expected, especially in fp16 and bf16. (0.21.0) — [release notes](https://github.com/huggingface/peft/releases/tag/v0.21.0)

### Behavior and default changes

- OFT moved from a method-specific quantization backend to the generic backend, affecting bitsandbytes, GPT-Q, and other quantization integrations; existing checkpoints should be unaffected. (0.21.0) — [release notes](https://github.com/huggingface/peft/releases/tag/v0.21.0)
- Support was added for torchao v0.18.0 and newer tensor subclasses, including Int8Tensor and Float8Tensor. (0.21.0) — [release notes](https://github.com/huggingface/peft/releases/tag/v0.21.0)

### Fixes and other changes

- Fixes an issue that prevented encoder-decoder models from working with Transformers ≥ 5.18.0. (0.21.2) — [release notes](https://github.com/huggingface/peft/releases/tag/v0.21.2)
- Tensor Parallel now works properly with PEFT, enabling developers to use PEFT with Tensor Parallel. (0.21.1) — [release notes](https://github.com/huggingface/peft/releases/tag/v0.21.1)
- Loading or adding another adapter no longer changes requires_grad for existing adapters or the base model based on is_trainable. (0.21.0) — [release notes](https://github.com/huggingface/peft/releases/tag/v0.21.0)
- Combining LoRA adapters no longer applies LoRA scaling twice in the SVD path. (0.21.0) — [release notes](https://github.com/huggingface/peft/releases/tag/v0.21.0)
- Targeted module names no longer contain duplicates and remain sorted by insertion order. (0.21.0) — [release notes](https://github.com/huggingface/peft/releases/tag/v0.21.0)
- Targeted parameter names no longer contain duplicates and remain sorted by insertion order. (0.21.0) — [release notes](https://github.com/huggingface/peft/releases/tag/v0.21.0)
