Spaces:
Runtime error
Runtime error
debug
Browse files
app.py
CHANGED
@@ -8,7 +8,6 @@ if torch.cuda.is_available():
|
|
8 |
device = "cuda"
|
9 |
else:
|
10 |
device = "cpu"
|
11 |
-
|
12 |
device_map={'': 0}
|
13 |
def generate_instruction_prompt(instruction, input=None):
|
14 |
if input:
|
@@ -71,6 +70,7 @@ def load_lora(lora_path, base_model="decapoda-research/llama-7b-hf"):
|
|
71 |
device_map=device_map,
|
72 |
low_cpu_mem_usage=True,
|
73 |
)
|
|
|
74 |
lora = PeftModel.from_pretrained(
|
75 |
model,
|
76 |
lora_path,
|
|
|
8 |
device = "cuda"
|
9 |
else:
|
10 |
device = "cpu"
|
|
|
11 |
device_map={'': 0}
|
12 |
def generate_instruction_prompt(instruction, input=None):
|
13 |
if input:
|
|
|
70 |
device_map=device_map,
|
71 |
low_cpu_mem_usage=True,
|
72 |
)
|
73 |
+
print("Loading LoRA...")
|
74 |
lora = PeftModel.from_pretrained(
|
75 |
model,
|
76 |
lora_path,
|