shekkari21 commited on
Commit
f18d7d3
·
1 Parent(s): 40aa371
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -86,7 +86,7 @@ lora_cfg = LoraConfig(
86
  # Wrap base model with PEFT LoRA
87
  peft_model = get_peft_model(base_model, lora_cfg)
88
  # Load adapter-only weights and merge into base
89
- adapter_state = torch.load(actual_weights_file_path, map_location="cpu") # Use the correct file path
90
  peft_model.load_state_dict(adapter_state, strict=False)
91
  model = peft_model.merge_and_unload()
92
  print("Merged base model with LoRA adapters.")
 
86
  # Wrap base model with PEFT LoRA
87
  peft_model = get_peft_model(base_model, lora_cfg)
88
  # Load adapter-only weights and merge into base
89
+ adapter_state = torch.load(actual_weights_file_path, map_location="cpu")
90
  peft_model.load_state_dict(adapter_state, strict=False)
91
  model = peft_model.merge_and_unload()
92
  print("Merged base model with LoRA adapters.")