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