Giter Club home page Giter Club logo

chat-transformer's Introduction

chat-transformer

over-documented over-explained chatbot using original transformer as sequence-to-sequence model

What is this?

My research interest is in incorporating the the latest research in natural language processing and reinforcement learning into palpable human interaction such as fully neural network based conversational dialogue.

chloe is an end to end neural network chatbot written in PyTorch based on the transformer. Accomplishing goals through conversation is a task we can all relate to, thus chatbots are an ideal agent through which to connect new research to our current understanding of AI and demonstrate new research. chloe is built from modules that are thoroughly explained and demonstrated using jupyter notebooks and toy examples that build from these basics.

  • Python 3.6 to 3.8
  • torch==1.7.1 (PyTorch)
  • torchtext==0.4.0
  • nltk==3.4.5 (Natural Language Toolkit)

Table of Contents

  • START_HERE introduction, summon and meet chloe
  • Trainer Tokenization in Sequnce to Sequence learning, intuitive explaination of Loss Functions using a toy example of cross entropy
  • Building Blocks of Neural Networks Word Vector Embeddings, Positional Encoding, Neural Networks, Attention, Masking
  • The Network Architecture Assembling the building blocks into an encoder and decoder
  • Talk How chloe chooses which words to say in a sentence and some basic probability

How to Start

if you already have python 3.6 and virtual environments, create a python 3.6 virtual environment, here i used env36 for python3.6 but you can use anything

python3 -m venv env or $ python3.6 -m venv env or virtualenv --python=/usr/bin/python3.6 env

if python3.6 is your default version, then when you type python into your terminal then it should say python version 3.6.x, and for you making the virtual environment is as simple as

$ python -m venv env

otherwise it is simple to get python3.6 and virtual environments

how to install Python 3.6 on ubuntu

install virtual environment then

how to specify the Python executable you want to use

sudo add-apt-repository ppa:jonathonf/python-3.6

sudo apt-get update

sudo apt-get install python3.6

virtualenv --python=/usr/bin/python3.6 env36

When you want to run the code activate the virtual environment inside the same folder as your environment env using

$ source env/bin/activate

install dependencies

$ pip3 install -r requirements.txt

even with virtual environments, some troubleshoot might be needed

with enough google searches you can find an answer for almost any problem

save new dependences to requirements

$ pip3 freeze > requirements.txt

You can deactivate the virtual environment using the following command in your terminal:

$ deactivate

More Tips and Tricks

if you get a ImportError: No module named while at the same time in your Terminal you get

pip3 install import-ipynb

Requirement already satisfied: import-ipynb in /path/to/env/lib/python3.6/site-packages (0.1.3)

This can be fixed by providing your python interpreter with the path-to-your-module,the path

import sys

sys.path.append('/path/to/env/lib/python3.6/site-packages')

you can find this path listed here

$ python3 -m site

Suggested resources for those new to python or deep learning

chat-transformer's People

Contributors

clam004 avatar

Stargazers

 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.