Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -20,7 +20,7 @@ base_model = AutoModelForCausalLM.from_pretrained(
|
|
| 20 |
|
| 21 |
ckpts = "ckpts/Qlora_adaptor/"
|
| 22 |
phi2_model = PeftModel.from_pretrained(base_model, ckpts)
|
| 23 |
-
phi2_model = phi2_model.merge_and_unload().to(device)
|
| 24 |
|
| 25 |
projection_layer = torch.nn.Linear(config.get("clip_embed"), config.get("phi_embed"))
|
| 26 |
projection_layer.load_state_dict(torch.load('./ckpts/model_phase2.pth', map_location=config.get("device")))
|
|
|
|
| 20 |
|
| 21 |
ckpts = "ckpts/Qlora_adaptor/"
|
| 22 |
phi2_model = PeftModel.from_pretrained(base_model, ckpts)
|
| 23 |
+
phi2_model = phi2_model.merge_and_unload().to(config.get("device"))
|
| 24 |
|
| 25 |
projection_layer = torch.nn.Linear(config.get("clip_embed"), config.get("phi_embed"))
|
| 26 |
projection_layer.load_state_dict(torch.load('./ckpts/model_phase2.pth', map_location=config.get("device")))
|