All Projects → henriblancke → neural-chat

henriblancke / neural-chat

Licence: other
An AI chatbot using seq2seq

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to neural-chat

Awesome Chatbot
Awesome Chatbot Projects,Corpus,Papers,Tutorials.Chinese Chatbot =>:
Stars: ✭ 1,785 (+5850%)
Mutual labels:  seq2seq, seq2seq-model, seq2seq-chatbot
Poetry Seq2seq
Chinese Poetry Generation
Stars: ✭ 159 (+430%)
Mutual labels:  seq2seq, beam-search
Tf Seq2seq
Sequence to sequence learning using TensorFlow.
Stars: ✭ 387 (+1190%)
Mutual labels:  seq2seq, beam-search
Seq2seq
基于Pytorch的中文聊天机器人 集成BeamSearch算法
Stars: ✭ 200 (+566.67%)
Mutual labels:  seq2seq, beam-search
Seq2seq chatbot
基于seq2seq模型的简单对话系统的tf实现,具有embedding、attention、beam_search等功能,数据集是Cornell Movie Dialogs
Stars: ✭ 308 (+926.67%)
Mutual labels:  seq2seq, beam-search
Im2latex
Image to LaTeX (Seq2seq + Attention with Beam Search) - Tensorflow
Stars: ✭ 342 (+1040%)
Mutual labels:  seq2seq, beam-search
Pytorch Chatbot
Pytorch seq2seq chatbot
Stars: ✭ 336 (+1020%)
Mutual labels:  seq2seq, beam-search
beam search
Beam search for neural network sequence to sequence (encoder-decoder) models.
Stars: ✭ 31 (+3.33%)
Mutual labels:  seq2seq, beam-search
Conversation Tensorflow
TensorFlow implementation of Conversation Models
Stars: ✭ 143 (+376.67%)
Mutual labels:  conversation, seq2seq
Seq2seqchatbots
A wrapper around tensor2tensor to flexibly train, interact, and generate data for neural chatbots.
Stars: ✭ 466 (+1453.33%)
Mutual labels:  conversation, seq2seq
chatbot
🤖️ 基于 PyTorch 的任务型聊天机器人(支持私有部署和 docker 部署的 Chatbot)
Stars: ✭ 77 (+156.67%)
Mutual labels:  seq2seq, seq2seq-chatbot
transformer
Neutron: A pytorch based implementation of Transformer and its variants.
Stars: ✭ 60 (+100%)
Mutual labels:  seq2seq, beam-search
Seq2seq chatbot new
基于seq2seq模型的简单对话系统的tf实现,具有embedding、attention、beam_search等功能,数据集是Cornell Movie Dialogs
Stars: ✭ 144 (+380%)
Mutual labels:  seq2seq, beam-search
Nlp made easy
Explains nlp building blocks in a simple manner.
Stars: ✭ 232 (+673.33%)
Mutual labels:  seq2seq, beam-search
minimal-nmt
A minimal nmt example to serve as an seq2seq+attention reference.
Stars: ✭ 36 (+20%)
Mutual labels:  seq2seq, beam-search
keras-chatbot-web-api
Simple keras chat bot using seq2seq model with Flask serving web
Stars: ✭ 51 (+70%)
Mutual labels:  seq2seq, seq2seq-model
alexa-conversation
Framework to easily test your Alexa skills functionally by creating a conversation with your skill.
Stars: ✭ 51 (+70%)
Mutual labels:  conversation
assistant-with-discovery-openwhisk
DEPRECATED: this repo is no longer actively maintained
Stars: ✭ 21 (-30%)
Mutual labels:  conversation
SemEval2019Task3
Code for ANA at SemEval-2019 Task 3
Stars: ✭ 41 (+36.67%)
Mutual labels:  conversation
Neural Conversation Models
Tensorflow based Neural Conversation Models
Stars: ✭ 29 (-3.33%)
Mutual labels:  seq2seq

Neural Chatbot (seq2seq)

Resources

  1. Sequence to Sequence Learning with Neural Networks
  2. A Neural Conversational Model
  3. A Diversity-Promoting Objective Function for Neural Conversation Models
  4. A Persona-Based Neural Conversation Model

Getting started

Install the requirements

pip install -r requirements.txt

Download train and test data

python s3.py --retrieve

Start training the model

python run.py

Test the trained model

python run.py --test

Save model checkpoints to S3

python s3.py --save

Using beam search

A lot of the research building upon seq2seq to make an AI chatbot uses some approach of beam search. One of the aims of this project was to implement beam search. It is nonetheless still in an experimental phase. The beam search approach in this project is based on the work of Nikita Kitaev.

To use beam search, either set the beam_search flag in the variables.py file to True or run the run.py script with --beam_search=True flag.

Data input format

The input data is split into a training and testing dataset. Both the training and testing dataset contain Q&A or conversational turns. The input file contains a question followed by its response or answer. For simplicity we forget the context of the conversation when looking at conversational turns, there are ways to model conversational context.

Parameters

Tuning the model parameters

Most of the models parameters can be customized in the variables.py file using TensorFlow flags. All flag arguments are optional since reasonable default values are provided. More info below on tuning parameters.

Training parameters:

Flag Description
--learning_rate LEARNING_RATE Learning rate.
--learning_rate_decay_factor LEARNING_RATE_DECAY_FACTOR Learning rate decays by this much.
--max_gradient_norm MAX_GRADIENT_NORM Clip gradients to this norm.
--steps_per_checkpoint STEPS_PER_CHECKPOINT How many training steps to do per checkpoint.

Model architecture:

Flag Description
--batch_size BATCH_SIZE Batch size to use during training.
--size SIZE Size of each model layer.
--num_layers NUM_LAYERS Number of layers in the model.
--vocab_size VOCAB_SIZE Vocabulary size.
--model_type MODEL_TYPE Seq2Seq model type: 'embedding_attention' or 'embedding'
--buckets BUCKETS Implement the model with buckets
--nobuckets
--max_sentence_length MAX_SENTENCE_LENGTH Maximum sentence length for model WITHOUT buckets

Data parameters:

Flag Description
--max_train_data_size MAX_TRAIN_DATA_SIZE Limit on the size of training data (0: no limit).

Directories:

Flag Description
--data_dir DATA_DIR Data directory.
--train_dir TRAIN_DIR Training directory.
--log_dir LOG_DIR Logging directory.

Roadmap

  • Add Tensorboard
  • Add more advanced text pre-processing (see preprocess.py)
  • Add option to use pre-trained embeddings
  • Implement Diversity promotion
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].