GithubHelp home page GithubHelp logo

gpt2-transform's Introduction

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

  • 目前只有GPT2部分可用。
  • 目前只在CPU上测试通过。

使用方法

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

数据格式

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

gpt2-transform

gpt2-transform

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.