
<h1 align="center">
CPM-Generate-distill
</h1>

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](https://github.com/TsinghuaAI/CPM-Generate)
The One Thing You Need to Know is this model is not uploaded by official, the conver script is [here](https://github.com/mymusise/CPM-TF2Transformer/blob/main/transfor_CMP.ipynb)

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


# How to use

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

```python
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](https://github.com/mymusise/CPM-TF2Transformer/raw/main/example-cpm-distill.jpeg)

{"language": "zh", "widget": [{"text": "\u5929\u4e0b\u7199\u7199\uff0c"}, {"text": "\u6e05\u534e\u5927\u5b66\u662f"}]}
transformers pytorch tf jax gpt2 text-generation zh autotrain_compatible endpoints_compatible text-generation-inference region:us
TAGS
#transformers #pytorch #tf #jax #gpt2 #text-generation #zh #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 


<h1 align="center">
CPM-Generate-distill
</h1>

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:




!avatar

# How to use

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




!avatar
TAGS
#transformers #pytorch #tf #jax #gpt2 #text-generation #zh #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 
 # How to use

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




!avatar
passage: TAGS
#transformers #pytorch #tf #jax #gpt2 #text-generation #zh #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 
# How to use

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




!avatar