Spaces:
Sleeping
Sleeping
Commit
·
f18d7d3
1
Parent(s):
40aa371
changed
Browse files
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")
|
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.")
|