Update README.md
Browse files
README.md
CHANGED
@@ -14,8 +14,8 @@ pip install transformers
|
|
14 |
from transformers import CpmAntTokenizer, CpmAntForCausalLM
|
15 |
|
16 |
texts = "今天天气不错,"
|
17 |
-
model =
|
18 |
-
tokenizer =
|
19 |
input_ids = tokenizer(texts, return_tensors="pt")
|
20 |
outputs = model.generate(**input_ids)
|
21 |
output_texts = tokenizer.batch_decode(outputs)
|
|
|
14 |
from transformers import CpmAntTokenizer, CpmAntForCausalLM
|
15 |
|
16 |
texts = "今天天气不错,"
|
17 |
+
model = CpmAntForCausalLM.from_pretrained("openbmb/cpm-ant-10b")
|
18 |
+
tokenizer = CpmAntTokenizer.from_pretrained("openbmb/cpm-ant-10b")
|
19 |
input_ids = tokenizer(texts, return_tensors="pt")
|
20 |
outputs = model.generate(**input_ids)
|
21 |
output_texts = tokenizer.batch_decode(outputs)
|