Giter Site home page Giter Site logo

statbot-gpt2's Introduction

Statbot GPT2

Uses GPT-2 to train a model on message data. Requires Python >= 3.6.

Data is not provided. It should be placed in a data folder inside the working directory.

Processing JSON

Message data comes in a specific format from statbot database dumps. Time is in ms.

 "columns": [
    "time",
    "authorID",
    "authorName",
    "channelID",
    "channelName",
    "messageText"
  ],

Messages can be accessed in the JSON at .results[0].series[0].values.

If you have a JSON dump, stick it in the data folder and then run

python nixnest_gpt2/process.py <channel>`

eg

python nixnest_gpt2/process.py dev-urandom

Training

Values for training can be tweaked inside the script. By default it uses:

  • 50,000 steps. This should be enough to get a very solid model out of a couple of hundred thousand messages.
    • You can set this to -1 to have training go on indefinitely.
  • The 355M model. At the time of writing this is the largest model that can be used for training/generating in this form.

Training can be started with:

python nixnest_gpt2/train.py <channel>

Restarting the process will cause training to continue from where it was.

Tensorflow 1 (not 2) is required. You also require exactly CUDA 10.0.

The trained model should end up in ./checkpoints/run1.

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.