Spaces:
Runtime error
Runtime error
upd
Browse files
app.py
CHANGED
@@ -68,14 +68,16 @@ def evaluate(
|
|
68 |
def load_lora(lora_path, base_model="decapoda-research/llama-7b-hf"):
|
69 |
model = LlamaForCausalLM.from_pretrained(
|
70 |
base_model,
|
71 |
-
|
72 |
# device_map=device_map,
|
73 |
low_cpu_mem_usage=True,
|
|
|
74 |
)
|
75 |
print("Loading LoRA...")
|
76 |
lora = PeftModel.from_pretrained(
|
77 |
model,
|
78 |
lora_path,
|
|
|
79 |
# device_map=device_map,
|
80 |
)
|
81 |
return lora
|
|
|
68 |
def load_lora(lora_path, base_model="decapoda-research/llama-7b-hf"):
|
69 |
model = LlamaForCausalLM.from_pretrained(
|
70 |
base_model,
|
71 |
+
load_in_8bit=True,
|
72 |
# device_map=device_map,
|
73 |
low_cpu_mem_usage=True,
|
74 |
+
torch_type=torch.float16,
|
75 |
)
|
76 |
print("Loading LoRA...")
|
77 |
lora = PeftModel.from_pretrained(
|
78 |
model,
|
79 |
lora_path,
|
80 |
+
torch_type=torch.float16,
|
81 |
# device_map=device_map,
|
82 |
)
|
83 |
return lora
|