Update README.md
Browse files
README.md
CHANGED
@@ -44,7 +44,7 @@ tokenizer = AutoTokenizer.from_pretrained("THUDM/chatglm3-6b-base", trust_remote
|
|
44 |
model = AutoModel.from_pretrained("THUDM/chatglm3-6b-base", trust_remote_code=True).half().cuda()
|
45 |
|
46 |
inputs = tokenizer(["今天天气真不错"], return_tensors="pt").to('cuda')
|
47 |
-
outputs =
|
48 |
print(tokenizer.decode(outputs[0].tolist()))
|
49 |
```
|
50 |
|
@@ -77,4 +77,4 @@ For more instructions, including how to run CLI and web demos, and model quantiz
|
|
77 |
pages={320--335},
|
78 |
year={2022}
|
79 |
}
|
80 |
-
```
|
|
|
44 |
model = AutoModel.from_pretrained("THUDM/chatglm3-6b-base", trust_remote_code=True).half().cuda()
|
45 |
|
46 |
inputs = tokenizer(["今天天气真不错"], return_tensors="pt").to('cuda')
|
47 |
+
outputs = model.generate(**inputs)
|
48 |
print(tokenizer.decode(outputs[0].tolist()))
|
49 |
```
|
50 |
|
|
|
77 |
pages={320--335},
|
78 |
year={2022}
|
79 |
}
|
80 |
+
```
|