Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -19,8 +19,9 @@ def load_llama_model():
|
|
19 |
model_id,
|
20 |
torch_dtype=torch.bfloat16,
|
21 |
device_map="auto",
|
22 |
-
|
23 |
-
)
|
|
|
24 |
processor = AutoProcessor.from_pretrained(model_id)
|
25 |
|
26 |
return model, processor
|
|
|
19 |
model_id,
|
20 |
torch_dtype=torch.bfloat16,
|
21 |
device_map="auto",
|
22 |
+
offload_folder="offload",
|
23 |
+
)
|
24 |
+
model.tie_weights()
|
25 |
processor = AutoProcessor.from_pretrained(model_id)
|
26 |
|
27 |
return model, processor
|