I have a basic model and some trained adapters. How can I switch between them?
Based on the documentation, this is done using the set_adapter
method.
However, if you look at the code, the add_adapter
, set_adapter
, enable_adapters
methods do not interact in any way with the coefficients stored in the adapter_model.safetensors
file. The only method that uses the saved adapter coefficients is the load_adapter
method. I put a breakpoint in the load_file
method in the torch
file of the safetensors
package and none of the methods except load_adapter
go there.
The question arises: how then do the recommended methods (add_adapter
, set_adapter
, enable_adapters
) use the coefficients of the trained adapter if they don’t even load them?