GithubHelp home page GithubHelp logo

muskanmahajan37 / gpt2ai_whatsapp_simulation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ashishpatel26/gpt2ai_whatsapp_simulation

0.0 0.0 0.0 812 KB

Fine tune Open AI's GPT2 on Whatsapp Chats to generate conversations

Jupyter Notebook 100.00%

gpt2ai_whatsapp_simulation's Introduction

gpt2AI_whatsapp_simulation

Fine tune Open AI's GPT2 on Whatsapp Chats to generate conversations. Works for both group chats and private chats.

The following steps are for running a Colab notebook, you can also run it locally. In that case it'd take longer since you don't get Colab's GPUs and you'd also have to replace the google drive folders with local ones.

There are 4 versions of the pretrained model. I have used the second largest one (774M, Large, ¬3GB). Colab (free version) was frequently crashing with the extra-large model. I won't be describing GPT-2 in detail, instead I'd encourage you to check this out if you are not familiar with it - https://openai.com/blog/better-language-models/

How to use:

  1. Export chats from Whatsapp mobile application. This will give you a file with a name like WhatsApp Chat with Sushil Khairnar.txt

  1. Create the following hierarchy in your google drive

  1. Upload the original_chat.txt in your google drive in the folder Original Chats

  2. Run the jupter notebook on Google colab.

  3. Check your output (gpt2_gentext_sushil_khairnar_20200802_084751.txt) in the Predicted Chats folder

I have intentionally cleared outputs of the cells before pushing the notebook to this repository, since both the original and predicted chats should be private. But rest assured, you'll be seeing some really interesting (and probably messed up :P) results.

Misc

  • The training checkpoints can be backed up into Chat models in case you want to come back and use the fine-tuned model later. This code cell is commented by default since the checkpoint size is >3GB.

  • The copy of files (generated_text) from Colab local runtime -> GDrive is a little slow, give it a couple of minutes

  • Drop a mail at [email protected] for any comments.

gpt2ai_whatsapp_simulation's People

Contributors

swahareddy 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.