Spaces:
Running
on
Zero
Running
on
Zero
Correctly move the model to the GPU AND change its data type
Browse files
app.py
CHANGED
|
@@ -14,7 +14,7 @@ model = AutoModel.from_pretrained(
|
|
| 14 |
trust_remote_code=True,
|
| 15 |
use_safetensors=True,
|
| 16 |
)
|
| 17 |
-
model = model.eval().to(torch.bfloat16)
|
| 18 |
|
| 19 |
|
| 20 |
@spaces.GPU
|
|
|
|
| 14 |
trust_remote_code=True,
|
| 15 |
use_safetensors=True,
|
| 16 |
)
|
| 17 |
+
model = model.eval().cuda().to(torch.bfloat16)
|
| 18 |
|
| 19 |
|
| 20 |
@spaces.GPU
|