mymusise/CPM-Generate-distill

Model

CPM-Generate-distill

7

8 commits

3 linked in READMEs

updated Apr 27, 2023

See the code

README

CPM-Generate-distill

CPM(Chinese Pre-Trained Language Models), which has 2.6B parameters, made by the research team of Beijing Zhiyuan Institute of artificial intelligence and Tsinghua University @TsinghuaAI.

repo: CPM-Generate The One Thing You Need to Know is this model is not uploaded by official, the conver script is here

And the CPM-Generate-distill is the distill model of CPM.

How to use

How to use this model directly from the 🤗/transformers library:

from transformers import TextGenerationPipeline, AutoTokenizer, AutoModelWithLMHead

tokenizer = AutoTokenizer.from_pretrained("mymusise/CPM-Generate-distill")
model = AutoModelWithLMHead.from_pretrained("mymusise/CPM-Generate-distill")

text_generater = TextGenerationPipeline(model, tokenizer)

print(text_generator('清华大学是', max_length=50, do_sample=True, top_p=0.9))

avatar

endpoints_compatible
gpt2
pytorch
text-generation
text-generation-inference
tf
transformers

mymusise/CPM-Generate-distill

Model

CPM-Generate-distill

7

8 commits

3 linked in READMEs

updated Apr 27, 2023

See the code

README

CPM-Generate-distill

CPM(Chinese Pre-Trained Language Models), which has 2.6B parameters, made by the research team of Beijing Zhiyuan Institute of artificial intelligence and Tsinghua University @TsinghuaAI.

repo: CPM-Generate The One Thing You Need to Know is this model is not uploaded by official, the conver script is here

And the CPM-Generate-distill is the distill model of CPM.

How to use

How to use this model directly from the 🤗/transformers library:

from transformers import TextGenerationPipeline, AutoTokenizer, AutoModelWithLMHead

tokenizer = AutoTokenizer.from_pretrained("mymusise/CPM-Generate-distill")
model = AutoModelWithLMHead.from_pretrained("mymusise/CPM-Generate-distill")

text_generater = TextGenerationPipeline(model, tokenizer)

print(text_generator('清华大学是', max_length=50, do_sample=True, top_p=0.9))

avatar

endpoints_compatible
gpt2
pytorch
text-generation
text-generation-inference
tf
transformers