Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,9 @@ model = LlamaForCausalLM.from_pretrained(
|
|
25 |
model_name,
|
26 |
quantization_config=quant_config
|
27 |
)
|
28 |
-
|
|
|
|
|
29 |
|
30 |
model = model.to("cuda")
|
31 |
|
|
|
25 |
model_name,
|
26 |
quantization_config=quant_config
|
27 |
)
|
28 |
+
|
29 |
+
config = PeftConfig.from_pretrained(lora_name, device="cpu")
|
30 |
+
model = PeftModel.from_pretrained(model, lora_name, config=config)
|
31 |
|
32 |
model = model.to("cuda")
|
33 |
|