text
🚀 Exciting news from 🤗 PEFT!
🚀 Exciting news from 🤗 PEFT!
new_line
new_line
text
We are introducing new merging methods for LoRA adapters. These methods allow for retaining the unique capabilities of individual LoRAs while enabling them to combine their strengths: 
We are introducing new merging methods for LoRA adapters. These methods allow for retaining the unique capabilities of individual LoRAs while enabling them to combine their strengths: 
link
https://huggingface.co/blog/peft_merging
https://huggingface.co/blog/peft_merging
new_line
new_line
text
We explored the application of merging LoRA adapters in the context of personal code copilot before 🚀👾✨. Please go through the below thread on it:  
We explored the application of merging LoRA adapters in the context of personal code copilot before 🚀👾✨. Please go through the below thread on it:  
link
https://x.com/sourab_m/status/1718008115726283004?s=20
https://x.com/sourab_m/status/1718008115726283004?s=20
new_line
new_line
text
New merging methods 
New merging methods 
inline_code
`ties`
ties
text
, 
, 
inline_code
`dare`
dare
text
, and 
, and 
inline_code
`magnitude_prune`
magnitude_prune
text
 introduced alongside existing methods 
 introduced alongside existing methods 
inline_code
`cat`
cat
text
, 
, 
inline_code
`linear`
linear
text
, and 
, and 
inline_code
`svd`
svd
text
. Blogpost details each method. These methods can be applied on-the-fly during inference time instead of merging offline enabling great developer UX. ✨
. Blogpost details each method. These methods can be applied on-the-fly during inference time instead of merging offline enabling great developer UX. ✨
new_line
new_line
text
How do I merge my LoRA adapters? 
How do I merge my LoRA adapters? 
new_line
text
Easy, use class method 
Easy, use class method 
inline_code
`add_weighted_adapter()`
add_weighted_adapter()
text
. For example, below you can see how we can combine three LoRA adapters using 
. For example, below you can see how we can combine three LoRA adapters using 
inline_code
`ties`
ties
text
 method. We can observe that merged adapter can retain the capabilities of individual adapters!
 method. We can observe that merged adapter can retain the capabilities of individual adapters!
new_line
new_line
text
Now that we have seen they can retain individual LoRAs, how about use cases wherein we require the capabilities from multiple LoRAs being merged/combined?  Below is an application of it in text-to-image domain. 🖼️
Now that we have seen they can retain individual LoRAs, how about use cases wherein we require the capabilities from multiple LoRAs being merged/combined?  Below is an application of it in text-to-image domain. 🖼️
new_line
new_line
text
Kudos to 
Kudos to 
mention
@prateeky2806
prateeky2806
text
 (TIES author) and Le Yu (DARE author) for their kind and generous guidance on the PRs! Also, if you want to explore full model merging, refer to super cool projects like 
 (TIES author) and Le Yu (DARE author) for their kind and generous guidance on the PRs! Also, if you want to explore full model merging, refer to super cool projects like 
link
https://github.com/arcee-ai/mergekit/tree/main
https://github.com/arcee-ai/mergekit/tree/main
text
,  
,  
link
https://github.com/Gryphe/BlockMerge_Gradient
https://github.com/Gryphe/BlockMerge_Gradient
text
 and 
 and 
link
https://github.com/yule-BUAA/MergeLM/tree/main
https://github.com/yule-BUAA/MergeLM/tree/main
text
.
.
new_line
new_line
text
Excited to see what the community creates on top of this! 🚀✨ #LetsBuildTogether
Excited to see what the community creates on top of this! 🚀✨ #LetsBuildTogether
new_line
🚀 Exciting news from 🤗 PEFT!

We are introducing new merging methods for LoRA adapters. These methods allow for retaining the unique capabilities of individual LoRAs while enabling them to combine their strengths: https://huggingface.co/blog/peft_merging

We explored the application of merging LoRA adapters in the context of personal code copilot before 🚀👾✨. Please go through the below thread on it:  https://x.com/sourab_m/status/1718008115726283004?s=20

New merging methods `ties`, `dare`, and `magnitude_prune` introduced alongside existing methods `cat`, `linear`, and `svd`. Blogpost details each method. These methods can be applied on-the-fly during inference time instead of merging offline enabling great developer UX. ✨

How do I merge my LoRA adapters? 
Easy, use class method `add_weighted_adapter()`. For example, below you can see how we can combine three LoRA adapters using `ties` method. We can observe that merged adapter can retain the capabilities of individual adapters!

Now that we have seen they can retain individual LoRAs, how about use cases wherein we require the capabilities from multiple LoRAs being merged/combined?  Below is an application of it in text-to-image domain. 🖼️

Kudos to @prateeky2806 (TIES author) and Le Yu (DARE author) for their kind and generous guidance on the PRs! Also, if you want to explore full model merging, refer to super cool projects like https://github.com/arcee-ai/mergekit/tree/main,  https://github.com/Gryphe/BlockMerge_Gradient and https://github.com/yule-BUAA/MergeLM/tree/main.

Excited to see what the community creates on top of this! 🚀✨ #LetsBuildTogether

❤️
jeffboudier samusenps clem ybelkada Kukedlc boapps vWake SnehShah impactframes Citaman MexIvanov ClayFace vanillaOVO madstuntman11 bachvudinh
🤗
kramp lysandre osanseviero vladbogo samusenps clem ybelkada impactframes madstuntman11