Update README.md
Browse files
README.md
CHANGED
@@ -19,6 +19,7 @@ from transformers import AutoTokenizer, AutoModel
|
|
19 |
tokenizer = AutoTokenizer.from_pretrained("THUDM/chatglm2-6b-int4", trust_remote_code=True)
|
20 |
model = AutoModel.from_pretrained("THUDM/chatglm2-6b-int4", trust_remote_code=True).half().cuda()
|
21 |
model = model.eval()
|
22 |
-
|
|
|
23 |
response
|
24 |
```
|
|
|
19 |
tokenizer = AutoTokenizer.from_pretrained("THUDM/chatglm2-6b-int4", trust_remote_code=True)
|
20 |
model = AutoModel.from_pretrained("THUDM/chatglm2-6b-int4", trust_remote_code=True).half().cuda()
|
21 |
model = model.eval()
|
22 |
+
text = "你好"
|
23 |
+
response, history = model.chat(tokenizer, text, history=[])
|
24 |
response
|
25 |
```
|