VanguardAI commited on
Commit
1fd9e99
·
verified ·
1 Parent(s): c6a203e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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.float16 if torch.cuda.is_available() else torch.float32
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