FIX Broken PEFT adapter loading (#42187)
* FIX Broken PEFT adapter loading
For some time now, loading PEFT adapters directly with transformers is
broken when using revisions or subfolders.
To check, run:
RUN_SLOW=1 pytest tests/peft_integration/test_peft_integration.py -k
test_peft_from_pretrained_hub_kwargs
This PR makes the PEFT tests pass.
The PR causing this is #41445 (bad commit:
1ee3b288a62c9de658e8be117d869c2a9b835a7c, previous good comit:
cad74496ca19c463a5fcc0b35ef4a1c9da2b8c4e). However, that PR also caused
other errors (see #41604), which is why this error was not immediately
obvious.
* Fix for adapter_kwargs being None