nemo_export.utils.lora_converter
#
Module Contents#
Functions#
This function converts nemo style (fused) lora weights to canonical (unfused) LoRA weights. |
|
API#
- nemo_export.utils.lora_converter.reformat_module_names_to_hf(
- tensors: Dict[str, torch.Tensor],
- nemo_export.utils.lora_converter.convert_lora_weights_to_canonical(
- config: Dict[str, Any],
- lora_weights: Dict[str, torch.Tensor],
This function converts nemo style (fused) lora weights to canonical (unfused) LoRA weights.
Namely, it unfuses the QKV adapter layers and the H-to-4H adapter layers.
- Returns:
The new LoRA weights with unfused layers.
- Return type:
Dict[str, torch.Tensor]