Skip to content

Chinese Pre-Trained Language Models (CPM-LM) Version-I for PaddlePaddle 2.x

License

Notifications You must be signed in to change notification settings

jm12138/CPM-Generate-Paddle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CPM-Generate-Paddle

本Repo将模型转换为PaddlePaddle版本,原Repo https://github.com/TsinghuaAI/CPM-Generate

原项目首页:https://cpm.baai.ac.cn/

原项目介绍文章:https://mp.weixin.qq.com/s/oI2Ak-M57MSuycLVpVEiHw

更新

基于 PaddleNLP 的新版本已更新【项目链接】

项目说明

参考CPM-GenerateCPM-LM-TF2gpt-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} }

About

Chinese Pre-Trained Language Models (CPM-LM) Version-I for PaddlePaddle 2.x

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages