Skip to main content

load_adapter_peft

Function load_adapter_peft 

Source
pub fn load_adapter_peft<P: AsRef<Path>>(
    dir: P,
) -> Result<(PeftAdapterConfig, Vec<(String, Vec<f32>)>), AdapterError>
Expand description

Load LoRA adapter from PEFT-compatible format

Reads adapter_config.json and adapter_model.safetensors from the given directory and returns the adapter configuration along with tensor name → weight data.