DUMB(Dumb Undereducated Maladroit Bot) chatbot, a chatbot implemented with PyTorch and trained with Cornell Movie Dialogs Corpus.
Under current support situation of PyTorch, MPS devices (commonly known as Apple Silicon GPU) suffer from extreme slow training, so just don't train with them now.
- Breakpoint continuous training to achieve intermittent training.
- Migrate to Python3.
- Python 3.12.6
- PyTorch 2.4.1
- torchaudio 2.4.1
- torchvision 0.19.1
- festival (Linux Environment)
- say (macOS Environment)
python3 prerequisites.py
The script would create dialogue_corpus.txt
under ./data
.
python3 train.py
Configs are stored in config.json
.
Model Training could be time-consuming. I would strongly recommend enabling CUDA in config.json
to accelerate the
whole training process.
{
"TRAIN": {
"DEVICE": "cuda"
}
}
And if you are using Apple Silicon GPUs, do the following:
{
"TRAIN": {
"DEVICE": "mps"
}
}
python3 chatbot.py
> hi .
bot: hi .
> what is your name ?
bot: vector frankenstein .
> how are you ?
bot: fine .
> where are you from ?
bot: up north .
> are you happy today ?
bot: yes .
Though it could answer some questions, it's still dumb enough.
- seq2seq (Sequence to Sequence) Model for Deep Learning with PyTorch
- PyTorch documentation
- seq2seq-translation
- tensorflow_chatbot
- Cornell Movie Dialogs Corpus
Made with ❤ by Justin Lee!
™ and © 1997-2024 Justin Lee. All Rights Reserved. License Agreement