huggingface / peft

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

ENH: Better DoRA check in mixed adapter batch inference #2089

Closed BenjaminBossan closed 6 days ago

BenjaminBossan commented 6 days ago

This is a bit of an edge case, but I noticed this while working on something else.

PEFT allows mixed batch adapter inference, i.e. when predicting, the same batch can use different adapters by passing the adapter_names argument. However, this is not supported for DoRA (yet), so there is a check that raises an error if DoRA is used.

Previously, this check would check all adapters for DoRA, even if those adapters are not being used in adapter_names. This was unnecessarily strict and with this PR, we only check the adapters that are actually being used.

HuggingFaceDocBuilderDev commented 6 days 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.