Need help with Decoders-Chinese-TF2.0?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

Morizeyao
135 Stars 27 Forks MIT License 22 Commits 5 Opened issues

Description

GPT2 training script for Chinese in Tensorflow 2.0

Services available

!
?

Need anything else?

Contributors list

# 11,301
Python
text-ge...
Shell
gpt-2
22 commits

基于Tensorflow 2.0 与 Huggingface 的 Transformers 的 GPT2 与 Transformer-XL 训练代码

(本项目不保证能稳定运行)

使用方法

  • pip install -r requirements.txt
  • 将scripts文件夹中的几个sh文件拷贝到拷贝到根目录。
  • 运行prepare_data.sh预处理。
  • 然后运行traingpt2keras.sh训练。
  • 运行generategpt2keras.sh生成。

数据格式

  • 本项目采用的语料格式为一个txt文件,每一行是一个json的列表,这个列表中包含了一篇文章。

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.