An implementation of Google's seq2seq architecture for building a chatbot.
Lua
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Models
Util
data/raw
.gitignore
LICENSE
MiniBatchLoader.lua
Preprocessor.lua
README.md
predict.lua
seq2seq.lua
train.lua

README.md

seq2seq-chatbot

**I've mostly stopped working on this project in favor of my newer implementation neural-chatbot done with TensorFlow.

An implementation of Google's seq2seq architecture.

I am also simultaneously blogging about the process.

##How to Use

First install torch if you haven't already. Here is an easy install process.

You will need to install a few packages to get this to work as well:

$ luarocks install nn
$ luarocks install rnn

Optional (for gpu usage):

$ luarocks install cunn
$ luarocks install cutorch

Or if you prefer AMD,

$ luarocks install clnn
$ luarocks install cltorch

If you get errors, you should try installing these packages as well:

$ luarocks install dpnn
$ luarocks install cunnx

You will need one or more large corpus text files with each line being a conversational phrase. The preceeding line is assumed to be the source, and the following line the target.

To simplify things, my plan is to either include a bash script that downloads a decent sized pre-cleaned corpus, or to actually include the corpus in the data directory. I will do this in the near future, probably after I finished the TODO list above.

##Examples of Usage and Training

Run

$ th train.lua

The dataset is stored in data/raw/, and comes from my other project opensubtitles-parser

##A few notes:

##Unfinished TODO

  1. Need to finish implementing prediction capabilities (ie/ actual chatbot interface for trained models)
  2. Look into checkpointing system, each checkpoint seems to take 3.6G.. Something is clearly wrong there.
  3. Need to profile code to check if there are unnecessary bottlenecks
  4. More testing and algorithm verification