Downloads · 30 days
7.8K
3% of all-time downloads
openbmb/cpm-ant-10b
cpm-ant-10b is a text generation model from openbmb. Use it when you need the model to write or continue text. It is set up for transformers.
Downloads · 30 days
7.8K
3% of all-time downloads
All-time downloads
266K
Public
Repo size
76.1 GB
Likes
24
Public
Click a slice to open those files.
.bin38.1 GB · 100%
From the Hugging Face model README
pip install transformers
from transformers import CpmAntTokenizer, CpmAntForCausalLM
texts = "今天天气不错,"
model = CpmAntForCausalLM.from_pretrained("openbmb/cpm-ant-10b")
tokenizer = CpmAntTokenizer.from_pretrained("openbmb/cpm-ant-10b")
input_ids = tokenizer(texts, return_tensors="pt")
outputs = model.generate(**input_ids)
output_texts = tokenizer.batch_decode(outputs)
print(output_texts)