Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,7 +8,7 @@ import time
|
|
| 8 |
model_id = "facebook/opt-6.7b"
|
| 9 |
assistant_id = "facebook/opt-125m"
|
| 10 |
|
| 11 |
-
model = AutoModelForCausalLM.from_pretrained(model_id,
|
| 12 |
assistant_model = AutoModelForCausalLM.from_pretrained(assistant_id).to(device=model.device, dtype=torch.bfloat16)
|
| 13 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 14 |
|
|
|
|
| 8 |
model_id = "facebook/opt-6.7b"
|
| 9 |
assistant_id = "facebook/opt-125m"
|
| 10 |
|
| 11 |
+
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16, device_map="auto")
|
| 12 |
assistant_model = AutoModelForCausalLM.from_pretrained(assistant_id).to(device=model.device, dtype=torch.bfloat16)
|
| 13 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 14 |
|