Commit 7b78e07f authored by wangsen's avatar wangsen
Browse files

Update model/infer_util.py

parent 626fed01
......@@ -25,7 +25,9 @@ def get_infer_setting(gpu_device=0, quant=None):
quantize(model.transformer, quant)
model.eval()
model = model.cuda()
tokenizer = AutoTokenizer.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True)
path = os.getcwd()
newpath = path +"/data"
tokenizer = AutoTokenizer.from_pretrained(newpath, trust_remote_code=True)
return model, tokenizer
def is_chinese(text):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment