本Repo将模型转换为PaddlePaddle版本,原Repo https://github.com/TsinghuaAI/CPM-Generate
原项目首页:https://cpm.baai.ac.cn/
原项目介绍文章:https://mp.weixin.qq.com/s/oI2Ak-M57MSuycLVpVEiHw
基于 PaddleNLP 的新版本已更新【项目链接】
参考CPM-Generate、CPM-LM-TF2、gpt-2-Pytorch等项目开发
感谢上述项目的开源代码和模型
可以使用百度AIStudio平台简单快速的体验试用这个模型,项目链接
- 克隆本项目代码
$ git clone https://github.com/jm12138/CPM-Generate-Paddle
$ cd CPM-Generate-Paddle
sentencepiece
jieba
paddlepaddle>=2.0.0rc0
- 运行测试Demo
$ python AI_Bot.py --pretrained_model [path to the pretrained model]
@article{cpm-v1, title={CPM: A Large-scale Generative Chinese Pre-trained Language Model}, author={Zhang, Zhengyan and Han, Xu, and Zhou, Hao, and Ke, Pei, and Gu, Yuxian and Ye, Deming and Qin, Yujia and Su, Yusheng and Ji, Haozhe and Guan, Jian and Qi, Fanchao and Wang, Xiaozhi and Zheng, Yanan and Cao, Jiannan and Zeng, Guoyang and Cao, Huanqi and Chen, Shengqi and Li, Daixuan and Sun, Zhenbo and Liu, Zhiyuan and Huang, Minlie and Han, Wentao and Tang, Jie and Li, Juanzi and Sun, Maosong}, year={2020} }