Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -336,7 +336,7 @@ def ensure_model_loaded():
|
|
| 336 |
attn_impl = "eager"
|
| 337 |
# Use GPU if available, otherwise CPU
|
| 338 |
if torch.cuda.is_available():
|
| 339 |
-
dtype = torch.
|
| 340 |
device_map = "auto"
|
| 341 |
else:
|
| 342 |
dtype = torch.float32
|
|
|
|
| 336 |
attn_impl = "eager"
|
| 337 |
# Use GPU if available, otherwise CPU
|
| 338 |
if torch.cuda.is_available():
|
| 339 |
+
dtype = torch.bfloat16 # Use bfloat16 on GPU for consistency
|
| 340 |
device_map = "auto"
|
| 341 |
else:
|
| 342 |
dtype = torch.float32
|