v0.7.0: Orthogonal Fine-Tuning, Megatron support, better initialization, safetensors, and more
merge (#1132)"gaussian" (#1189)adapter_model.bin, calling save_pretrained now creates adapter_model.safetensors. Safetensors have numerous advantages over pickle files (which is the PyTorch default format) and well supported on Hugging Face Hub.add_weighted_adapter with the option combination_type="linear", the scaling of the adapter weights is now performed differently, leading to improved results.peft.lora.Linear is no longer a subclass of nn.Linear, so isinstance checks may need updating). Also, to retrieve the original weight of an adapted layer, now use self.get_base_layer().weight, not self.weight (same for bias).As always, a bunch of small improvements, bug fixes and doc improvements were added. We thank all the external contributors, both new and recurring. Below is the list of all changes since the last release.
Docker] Update Dockerfile to force-use transformers main by @younesbelkada in https://github.com/huggingface/peft/pull/1085core] Fix safetensors serialization for shared tensors by @younesbelkada in https://github.com/huggingface/peft/pull/1101id_tensor_storage by @younesbelkada in https://github.com/huggingface/peft/pull/1116ModulesToSaveWrapper when using Low-level API by @younesbelkada in https://github.com/huggingface/peft/pull/1112adapter_names when calling merge by @younesbelkada in https://github.com/huggingface/peft/pull/1132Tests] Fix daily CI by @younesbelkada in https://github.com/huggingface/peft/pull/1136core / LoRA] Add adapter_names in bnb layers by @younesbelkada in https://github.com/huggingface/peft/pull/1139Tests] Do not stop tests if a job failed by @younesbelkada in https://github.com/huggingface/peft/pull/1141huggingface_hub.file_exists instead of custom helper by @Wauplin in https://github.com/huggingface/peft/pull/1145add_weighted_adapter method by @pacman100 in https://github.com/huggingface/peft/pull/1169Tests] Migrate to AWS runners by @younesbelkada in https://github.com/huggingface/peft/pull/1185modules_to_save is specified and multiple adapters are being unloaded by @pacman100 in https://github.com/huggingface/peft/pull/1137Full Changelog: https://github.com/huggingface/peft/compare/v0.6.2...v0.7.0
The following contributors have made significant changes to the library over the last release:
@alexrs
@callanwu
@elyxlz
@lukaskuhn-lku
@okotaku
@yxli2123
@zhangsheng377
Fetched April 7, 2026