Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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).
|
162 |
) # 3.92G
|
163 |
else:
|
164 |
model_glm = AutoModel.from_pretrained(
|
165 |
model_name, trust_remote_code=True
|
166 |
-
).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 |
|