Skip to content
fn

replace_lora_weights_loftq

→None
replace_lora_weights_loftq(peft_model: nn.Module, model_path: str | None = None, adapter_name: str = 'default', callback: Callable[[nn.Module, str], bool] | None = None)

Refused with NotImplementedError: 4-bit quantised LoRA layers are not implemented yet.

Provided for API parity with the reference adapter library.

Parameters

peft_modelnn.Module
Quantised PEFT model whose LoRA weights would be replaced.
model_pathstr= None
Path to the unquantised safetensors weights.
adapter_namestr= "default"
Adapter name to update.
callbackcallable= None
Per-module acceptance callback (model, module_name) -> bool.

Raises

NotImplementedError
Always raised; 4-bit quantised LoRA layers are not implemented yet.

Used by 1