In the transformers library, we can load multiple adapters to the original model by load_adapter then switch the specified adapter with set_adapter like below.
# base model
model = AutoModelForCausalLM.from_pretrained(
model_name,
)
# load multiple adapters
model.load_adapter("model/adapter1/", "adapter1")
model.load_adapter("model/adapter2/", "adapter2")
# switch adapter
model.set_adapter("adapter2")
Is it possible to do the same thing with llama cpp python?
I know constructor of Llama() has lora_base and lora_path parameters so one adapter can be applied when loading the model.
But my question is switch multiple adapters after model loading.
In the transformers library, we can load multiple adapters to the original model by
load_adapterthen switch the specified adapter withset_adapterlike below.Is it possible to do the same thing with llama cpp python?
I know constructor of
Llama()haslora_baseandlora_pathparameters so one adapter can be applied when loading the model.But my question is switch multiple adapters after model loading.