hiwei commited on
Commit
bd00e79
1 Parent(s): 780e3dc

use cpu to run model

Browse files
Files changed (1) hide show
  1. chatglm2_6b/modelClient.py +1 -2
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).half().cuda()
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,