bugfix python runtime

This commit is contained in:
游雁 2024-07-25 15:28:18 +08:00
parent a20157435e
commit 17e64505e8

View File

@ -937,7 +937,10 @@ class LLMASR4(nn.Module):
logging.info(f"use_lora: {llm_conf.get('use_lora', False)}")
if llm_conf.get("use_lora", False):
from omegaconf import OmegaConf
lora_conf = llm_conf.get("lora_conf", {})
lora_conf = OmegaConf.to_container(lora_conf, resolve=True)
from peft import get_peft_model, LoraConfig, TaskType, PeftConfig, PeftModel
lora_init_param_path = lora_conf.get("init_param_path", None)