huggingface / peft

🤗 PEFT: State-of-the-art Parameter-Efficient Fine-Tuning.
https://huggingface.co/docs/peft
Apache License 2.0
16.57k stars 1.64k forks source link

[BUG] Issue with using `rank_pattern` and `alpha_pattern` together in `LoraConfig` #2195

Closed sirluk closed 3 weeks ago

sirluk commented 3 weeks ago

This is a bugfix for issue 2194

Since the line matching module name to a substring pattern is called twice, I created a function and moved it to peft.utils.other. I think its a utility function that could be useful multiple times.

Also added a test case closely resembling the example in issue 2194 which passes now.

HuggingFaceDocBuilderDev commented 3 weeks ago

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.