fb700 commited on
Commit
5561f81
1 Parent(s): 0efe0f2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -158,12 +158,12 @@ has_cuda = torch.cuda.is_available()
158
 
159
  if has_cuda:
160
  model_glm = (
161
- AutoModel.from_pretrained(model_name, trust_remote_code=True).cuda().half()
162
  ) # 3.92G
163
  else:
164
  model_glm = AutoModel.from_pretrained(
165
  model_name, trust_remote_code=True
166
- ).float() .half().float()
167
 
168
  model_glm = model_glm.eval()
169
 
 
158
 
159
  if has_cuda:
160
  model_glm = (
161
+ AutoModel.from_pretrained(model_name, trust_remote_code=True).half().quantize(8).cuda()
162
  ) # 3.92G
163
  else:
164
  model_glm = AutoModel.from_pretrained(
165
  model_name, trust_remote_code=True
166
+ ).float().half().float()
167
 
168
  model_glm = model_glm.eval()
169