wormcode commited on
Commit
97f1e29
·
1 Parent(s): c6351f0

fix runtime error for model.half()

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -74,7 +74,7 @@ def main(
74
  model.config.bos_token_id = 1
75
  model.config.eos_token_id = 2
76
 
77
- if not load_8bit:
78
  model.half() # seems to fix bugs for some users.
79
 
80
  model.eval()
 
74
  model.config.bos_token_id = 1
75
  model.config.eos_token_id = 2
76
 
77
+ if not load_8bit and device != "cpu":
78
  model.half() # seems to fix bugs for some users.
79
 
80
  model.eval()