Spaces:
Runtime error
Runtime error
use cpu to run model
Browse files
chatglm2_6b/modelClient.py
CHANGED
@@ -22,8 +22,7 @@ class ChatGLM2(object):
|
|
22 |
if model_path:
|
23 |
self.model_path = model_path
|
24 |
self.tokenizer = AutoTokenizer.from_pretrained(self.model_path, trust_remote_code=True)
|
25 |
-
model = AutoModel.from_pretrained(self.model_path, trust_remote_code=True).
|
26 |
-
self.model = model.eval()
|
27 |
|
28 |
def generate(
|
29 |
self,
|
|
|
22 |
if model_path:
|
23 |
self.model_path = model_path
|
24 |
self.tokenizer = AutoTokenizer.from_pretrained(self.model_path, trust_remote_code=True)
|
25 |
+
self.model = AutoModel.from_pretrained(self.model_path, trust_remote_code=True).float()
|
|
|
26 |
|
27 |
def generate(
|
28 |
self,
|