robinhad commited on
Commit
91208a3
1 Parent(s): 01bf48f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -25,7 +25,9 @@ model = LlamaForCausalLM.from_pretrained(
25
  model_name,
26
  quantization_config=quant_config
27
  )
28
- model = PeftModel.from_pretrained(model, lora_name)
 
 
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