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