From ce66b0ecb50648666285c6d4b45af8f7414f78e5 Mon Sep 17 00:00:00 2001 From: cifangyiquan Date: Fri, 5 May 2023 22:04:01 +0800 Subject: [PATCH] fix input unicodedecodererror --- cli_demo.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cli_demo.py b/cli_demo.py index da80fff..3559840 100644 --- a/cli_demo.py +++ b/cli_demo.py @@ -2,6 +2,7 @@ import os import platform import signal from transformers import AutoTokenizer, AutoModel +import readline tokenizer = AutoTokenizer.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True) model = AutoModel.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True).half().cuda()