Git Product home page Git Product logo

cpm-generate-pytorch's Introduction

CPM-Generate-Pytorch

本Repo将模型转换为Pytorch单卡/CPU可运行的版本,原Repo https://github.com/TsinghuaAI/CPM-Generate

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

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

项目说明

参考CPM-GenerateCPM-LM-TF2gpt-2-Pytorch等项目开发

感谢上述项目的开源代码和模型

使用说明

  • 克隆本项目代码
$ git clone https://github.com/jm12138/CPM-Generate-Pytorch
$ cd CPM-Generate-Pytorch
  • 准备模型

    • 合并版模型暂未上传完成,所以请参考转换代码使用原版模型自行进行转换合并
  • 安装依赖

pytorch
sentencepiece 
jieba 
regex
  • 运行Demo
$ python demo.py

引用

@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} }

cpm-generate-pytorch's People

Contributors

aeroxi avatar jm12138 avatar unbuilt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.