Skip to content

Latest commit

 

History

History
63 lines (43 loc) · 3.2 KB

README_CN.md

File metadata and controls

63 lines (43 loc) · 3.2 KB

GPT2 for Multiple Languages

Open In Colab GitHub GitHub All Releases contributions welcome GitHub stars

中文说明 | English

  • 简化整理 GPT2 训练代码(based on Grover, supporting TPUs)
  • 移植 bert tokenizer,添加多语言支持
  • 15亿参数 GPT2 中文预训练模型( 15G 语料,训练 10w 步 )
  • 开箱即用的模型生成效果 demo #
  • 15亿参数 GPT2 中文预训练模型( 30G 语料,训练 22w 步 )

预训练模型

Size Language Corpus Vocab Link SHA256
1.5B parameters Chinese ~30G CLUE ( 8021 tokens ) Google Drive e698cc97a7f5f706f84f58bb469d614e
51d3c0ce5f9ab9bf77e01e3fcb41d482
1.5B parameters Chinese ~15G Bert ( 21128 tokens ) Google Drive 4a6e5124df8db7ac2bdd902e6191b807
a6983a7f5d09fb10ce011f9a073b183e

训练语料来自 THUCNews 以及 nlp_chinese_corpus,清洗后总文本量约 15G

使用 Cloud TPU Pod v3-256 训练 22w 步

loss

Google Colab

只需两次鼠标点击(不包括 Colab 授权流程),体验 15 亿参数中文预训练模型生成效果:

[Colab Notebook]

训练

免责声明

该项目中的内容仅供技术研究参考,不作为任何结论性依据。

Citation

@misc{GPT2-ML,
  author = {Zhibo Zhang},
  title = {GPT2-ML: GPT-2 for Multiple Languages},
  year = {2019},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/imcaspar/gpt2-ml}},
}

Reference

https://github.com/google-research/bert

https://github.com/rowanz/grover

Research supported with Cloud TPUs from Google's TensorFlow Research Cloud (TFRC)