Spaces:
Runtime error
Runtime error
Update model.py
Browse files
model.py
CHANGED
|
@@ -11,10 +11,10 @@ def load_model(
|
|
| 11 |
|
| 12 |
model = LlamaForCausalLM.from_pretrained(
|
| 13 |
base,
|
| 14 |
-
|
| 15 |
device_map="auto",
|
| 16 |
)
|
| 17 |
|
| 18 |
-
|
| 19 |
return model, tokenizer
|
| 20 |
|
|
|
|
| 11 |
|
| 12 |
model = LlamaForCausalLM.from_pretrained(
|
| 13 |
base,
|
| 14 |
+
load_in_8bit=True,
|
| 15 |
device_map="auto",
|
| 16 |
)
|
| 17 |
|
| 18 |
+
model = PeftModel.from_pretrained(model, finetuned, device_map={'': 0})
|
| 19 |
return model, tokenizer
|
| 20 |
|